Skip to content

Conversation

@drbyte
Copy link
Contributor

@drbyte drbyte commented Nov 23, 2020

Point PHP-FPM error_log to user directory

Old: /usr/local/var/log/php-fpm.log
New: ~/.config/valet/Log/php-fpm.log

(We already put ~/.config/valet/Log/nginx-error.log in this same directory.)

This avoids ARM Mac differences in directory paths (eg: /usr/local/ isn't a default anymore).
It also makes it easier for the User to find/access these logs.

Addendum to #992 discussion at #992 (review)

Old: `/usr/local/var/log/php-fpm.log`
New: `~/.config/valet/Log/php-fpm.log`

(We already put `~/.config/valet/Log/nginx-error.log` there)

This avoids ARM Mac differences in directory paths.
@drbyte
Copy link
Contributor Author

drbyte commented Nov 25, 2020

Hmmm ... maybe needs some discussion about other log files as well:

valet/cli/valet.php

Lines 481 to 487 in 21f0549

$app->command('log [-f|--follow] [-l|--lines=] [key]', function ($follow, $lines, $key = null) {
$defaultLogs = [
'php-fpm' => BREW_PREFIX.'/var/log/php-fpm.log',
'nginx' => VALET_HOME_PATH.'/Log/nginx-error.log',
'mailhog' => BREW_PREFIX.'/var/log/mailhog.log',
'redis' => BREW_PREFIX.'/var/log/redis.log',
];

... noting that redirecting those to another place requires adding more configuration that Valet doesn't already manage. Kinda prefer to avoid adding the complexity.

@mattstauffer mattstauffer merged commit 518a009 into laravel:master Nov 27, 2020
@drbyte drbyte deleted the fpm-errorlog-to-user-dir branch November 28, 2020 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants