-
-
Save chris-cmsoft/a6759d2e90c8864ccfc12a8302599696 to your computer and use it in GitHub Desktop.
Laravel - Add stdout logging channel
This file contains 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
# .env | |
LOG_CHANNEL=stdout |
This file contains 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
# config/logging.php | |
return [ | |
'channels': [ | |
# Add a new stdout logger | |
'stdout' => [ | |
'driver' => 'monolog', | |
'level' => env('LOG_LEVEL', 'debug'), | |
'handler' => StreamHandler::class, | |
'formatter' => env('LOG_STDOUT_FORMATTER'), | |
'with' => [ | |
'stream' => 'php://stdout', | |
], | |
], | |
], | |
]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment