logging (Before) logging (After)
<?php <?php
   
use Monolog\Handler\StreamHandler; use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler; use Monolog\Handler\SyslogUdpHandler;
   
return [ return [
   
   /*    /*
   |--------------------------------------------------------------------------    |--------------------------------------------------------------------------
   | Default Log Channel    | Default Log Channel
   |--------------------------------------------------------------------------    |--------------------------------------------------------------------------
   |    |
   | This option defines the default log channel that gets used when writing    | This option defines the default log channel that gets used when writing
   | messages to the logs. The name specified in this option should match    | messages to the logs. The name specified in this option should match
   | one of the channels defined in the "channels" configuration array.    | one of the channels defined in the "channels" configuration array.
   |    |
   */     */ 
   
   'default' => env('LOG_CHANNEL', 'stack'),    'default' => env('LOG_CHANNEL', 'stack'),
   
   /*    /*
   |--------------------------------------------------------------------------    |--------------------------------------------------------------------------
   | Log Channels    | Log Channels
   |--------------------------------------------------------------------------    |--------------------------------------------------------------------------
   |    |
   | Here you may configure the log channels for your application. Out of    | Here you may configure the log channels for your application. Out of
   | the box, Laravel uses the Monolog PHP logging library. This gives    | the box, Laravel uses the Monolog PHP logging library. This gives
   | you a variety of powerful log handlers / formatters to utilize.    | you a variety of powerful log handlers / formatters to utilize.
   |    |
   | Available Drivers: "single", "daily", "slack", "syslog",    | Available Drivers: "single", "daily", "slack", "syslog",
   |                    "errorlog", "monolog",    |                    "errorlog", "monolog",
   |                    "custom", "stack"    |                    "custom", "stack"
   |    |
   */     */ 
   
   'channels' => [    'channels' => [
       'stack' => [        'stack' => [
           'driver' => 'stack',            'driver' => 'stack',
           'channels' => ['daily'],            'channels' => ['daily'],
           'ignore_exceptions' => false,            'ignore_exceptions' => false,
       ],        ],
   
       'single' => [        'single' => [
           'driver' => 'single',            'driver' => 'single',
           'path' => storage_path('logs/laravel.log'),            'path' => storage_path('logs/laravel.log'),
           'level' => 'debug',            'level' => 'debug',
       ],        ],
   
       'daily' => [        'daily' => [
           'driver' => 'daily',            'driver' => 'daily',
           'path' => storage_path('logs/laravel.log'),            'path' => storage_path('logs/laravel.log'),
           'level' => 'debug',            'level' => 'debug',
           'days' => 14,            'days' => 14,
       ],        ],
   
       'email' => [        'email' => [
           'driver' => 'daily',            'driver' => 'daily',
           'path' => storage_path('logs/email.log'),            'path' => storage_path('logs/email.log'),
           'level' => 'debug',            'level' => 'debug',
           'days' => 14,            'days' => 14,
       ],        ],
   
.         'cron' => [
             'driver' => 'daily',
             'path' => storage_path('logs/cron.log'),
             'level' => 'debug',
             'days' => 14,
         ],
   
       'slack' => [        'slack' => [
           'driver' => 'slack',            'driver' => 'slack',
           'url' => env('LOG_SLACK_WEBHOOK_URL'),            'url' => env('LOG_SLACK_WEBHOOK_URL'),
           'username' => 'Laravel Log',            'username' => 'Laravel Log',
           'emoji' => ':boom:',            'emoji' => ':boom:',
           'level' => 'critical',            'level' => 'critical',
       ],        ],
   
       'papertrail' => [        'papertrail' => [
           'driver' => 'monolog',            'driver' => 'monolog',
           'level' => 'debug',            'level' => 'debug',
           'handler' => SyslogUdpHandler::class,            'handler' => SyslogUdpHandler::class,
           'handler_with' => [            'handler_with' => [
               'host' => env('PAPERTRAIL_URL'),                'host' => env('PAPERTRAIL_URL'),
               'port' => env('PAPERTRAIL_PORT'),                'port' => env('PAPERTRAIL_PORT'),
           ],            ],
       ],        ],
   
       'stderr' => [        'stderr' => [
           'driver' => 'monolog',            'driver' => 'monolog',
           'handler' => StreamHandler::class,            'handler' => StreamHandler::class,
           'formatter' => env('LOG_STDERR_FORMATTER'),            'formatter' => env('LOG_STDERR_FORMATTER'),
           'with' => [            'with' => [
               'stream' => 'php://stderr',                'stream' => 'php://stderr',
           ],            ],
       ],        ],
   
       'syslog' => [        'syslog' => [
           'driver' => 'syslog',            'driver' => 'syslog',
           'level' => 'debug',            'level' => 'debug',
       ],        ],
   
       'errorlog' => [        'errorlog' => [
           'driver' => 'errorlog',            'driver' => 'errorlog',
           'level' => 'debug',            'level' => 'debug',
       ],        ],
   ],    ],
   
]; ];