Sending Laravel logs to stdout and Telescope error #52606
Unanswered
vitalykarasik
asked this question in
Q&A
Replies: 2 comments 4 replies
-
Why don't you create a custom channel for the commands: 'commands' => [
'driver' => 'single',
'path' => '/var/log/laravel-scheduler.log', // or the normal storage_path('logs/laravel-scheduler.log')
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
], And simply use $logger - Log::channel('commands');
$logger->info/debug/etc...('Message'); |
Beta Was this translation helpful? Give feedback.
3 replies
-
Hi. If you use background shell for your scheduled commands (->runInBackground()) logging to stdout is impossible. see #50085 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to use https://stackoverflow.com/a/46767123/499915 workaround for sending logs from Laravel Scheduler jobs to stdout. In fact, it's just using a symlink like
ln -sf /proc/1/fd/1 /var/log/laravel-scheduler.log
This works nice, but Telescope module doesn't like this symlink, it fails with
Failed to open stream: No such file or directory {"exception":"[object] (ErrorException(code: 0): file_get_contents(/var/logs/laravel-scheduler.log): Failed to open stream: No such file or directory at /var/www/vendor/laravel/telescope/src/Watchers/ScheduleWatcher.php:68)"}
Is there a way to eliminate this error?
Beta Was this translation helpful? Give feedback.
All reactions