Skip to content

Instantly share code, notes, and snippets.

@chris-cmsoft
Created October 28, 2021 07:52
Show Gist options
  • Save chris-cmsoft/a6759d2e90c8864ccfc12a8302599696 to your computer and use it in GitHub Desktop.
Save chris-cmsoft/a6759d2e90c8864ccfc12a8302599696 to your computer and use it in GitHub Desktop.
Laravel - Add stdout logging channel
# .env
LOG_CHANNEL=stdout
# 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