Skip to content

Commit

Permalink
Better logs:php-fpm task
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Oct 19, 2024
1 parent 06fba55 commit 0be1ddb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion recipe/provision/php.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@

desc('Shows php-fpm logs');
task('logs:php-fpm', function () {
run('tail -f /var/log/fpm-php.www.log');
$fpmLogs = run("ls -1 /var/log | grep fpm");
if (empty($fpmLogs)) {
throw new \RuntimeException('No PHP-FPM logs found.');
}
run("sudo tail -f /var/log/$fpmLogs");
})->verbose();

desc('Installs Composer');
Expand Down

0 comments on commit 0be1ddb

Please sign in to comment.