|
| 1 | +<?php |
| 2 | + |
| 3 | +use Monolog\Handler\StreamHandler; |
| 4 | +use Monolog\Handler\SyslogUdpHandler; |
| 5 | + |
| 6 | +return [ |
| 7 | + |
| 8 | + /* |
| 9 | + |-------------------------------------------------------------------------- |
| 10 | + | Default Log Channel |
| 11 | + |-------------------------------------------------------------------------- |
| 12 | + | |
| 13 | + | This option defines the default log channel that gets used when writing |
| 14 | + | messages to the logs. The name specified in this option should match |
| 15 | + | one of the channels defined in the "channels" configuration array. |
| 16 | + | |
| 17 | + */ |
| 18 | + |
| 19 | + 'default' => env('LOG_CHANNEL', 'stack'), |
| 20 | + |
| 21 | + /* |
| 22 | + |-------------------------------------------------------------------------- |
| 23 | + | Log Channels |
| 24 | + |-------------------------------------------------------------------------- |
| 25 | + | |
| 26 | + | Here you may configure the log channels for your application. Out of |
| 27 | + | the box, Laravel uses the Monolog PHP logging library. This gives |
| 28 | + | you a variety of powerful log handlers / formatters to utilize. |
| 29 | + | |
| 30 | + | Available Drivers: "single", "daily", "slack", "syslog", |
| 31 | + | "errorlog", "monolog", |
| 32 | + | "custom", "stack" |
| 33 | + | |
| 34 | + */ |
| 35 | + |
| 36 | + 'channels' => [ |
| 37 | + 'stack' => [ |
| 38 | + 'driver' => 'stack', |
| 39 | + 'channels' => ['single'], |
| 40 | + ], |
| 41 | + |
| 42 | + 'single' => [ |
| 43 | + 'driver' => 'single', |
| 44 | + 'path' => storage_path('logs/laravel.log'), |
| 45 | + 'level' => 'debug', |
| 46 | + ], |
| 47 | + |
| 48 | + 'daily' => [ |
| 49 | + 'driver' => 'daily', |
| 50 | + 'path' => storage_path('logs/laravel.log'), |
| 51 | + 'level' => 'debug', |
| 52 | + 'days' => 7, |
| 53 | + ], |
| 54 | + |
| 55 | + 'slack' => [ |
| 56 | + 'driver' => 'slack', |
| 57 | + 'url' => env('LOG_SLACK_WEBHOOK_URL'), |
| 58 | + 'username' => 'Laravel Log', |
| 59 | + 'emoji' => ':boom:', |
| 60 | + 'level' => 'critical', |
| 61 | + ], |
| 62 | + |
| 63 | + 'papertrail' => [ |
| 64 | + 'driver' => 'monolog', |
| 65 | + 'level' => 'debug', |
| 66 | + 'handler' => SyslogUdpHandler::class, |
| 67 | + 'handler_with' => [ |
| 68 | + 'host' => env('PAPERTRAIL_URL'), |
| 69 | + 'port' => env('PAPERTRAIL_PORT'), |
| 70 | + ], |
| 71 | + ], |
| 72 | + |
| 73 | + 'stderr' => [ |
| 74 | + 'driver' => 'monolog', |
| 75 | + 'handler' => StreamHandler::class, |
| 76 | + 'with' => [ |
| 77 | + 'stream' => 'php://stderr', |
| 78 | + ], |
| 79 | + ], |
| 80 | + |
| 81 | + 'syslog' => [ |
| 82 | + 'driver' => 'syslog', |
| 83 | + 'level' => 'debug', |
| 84 | + ], |
| 85 | + |
| 86 | + 'errorlog' => [ |
| 87 | + 'driver' => 'errorlog', |
| 88 | + 'level' => 'debug', |
| 89 | + ], |
| 90 | + ], |
| 91 | + |
| 92 | +]; |
0 commit comments