Last active
June 5, 2020 02:29
-
-
Save jorgecolonconsulting/9a142710fe9e8fac99434cbba492b03c to your computer and use it in GitHub Desktop.
Laravel 5.6: Logging to console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
'default' => env('LOG_CHANNEL', 'stack'), | |
'channels' => [ | |
'stack' => [ | |
'driver' => 'stack', | |
'channels' => array_merge(['single'], php_sapi_name() === 'cli' ? ['stdout'] : []), | |
], | |
'single' => [ | |
'driver' => 'single', | |
'path' => storage_path('logs/laravel.log'), | |
'level' => 'debug', | |
], | |
'stdout' => [ | |
'driver' => 'monolog', | |
'handler' => StreamHandler::class, | |
'with' => [ | |
'stream' => 'php://stdout', | |
], | |
], | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment