[c454c0f] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | use Monolog\Handler\NullHandler;
|
---|
| 4 | use Monolog\Handler\StreamHandler;
|
---|
| 5 | use Monolog\Handler\SyslogUdpHandler;
|
---|
| 6 | use Monolog\Processor\PsrLogMessageProcessor;
|
---|
| 7 |
|
---|
| 8 | return [
|
---|
| 9 |
|
---|
| 10 | /*
|
---|
| 11 | |--------------------------------------------------------------------------
|
---|
| 12 | | Default Log Channel
|
---|
| 13 | |--------------------------------------------------------------------------
|
---|
| 14 | |
|
---|
| 15 | | This option defines the default log channel that gets used when writing
|
---|
| 16 | | messages to the logs. The name specified in this option should match
|
---|
| 17 | | one of the channels defined in the "channels" configuration array.
|
---|
| 18 | |
|
---|
| 19 | */
|
---|
| 20 |
|
---|
| 21 | 'default' => env('LOG_CHANNEL', 'stack'),
|
---|
| 22 |
|
---|
| 23 | /*
|
---|
| 24 | |--------------------------------------------------------------------------
|
---|
| 25 | | Deprecations Log Channel
|
---|
| 26 | |--------------------------------------------------------------------------
|
---|
| 27 | |
|
---|
| 28 | | This option controls the log channel that should be used to log warnings
|
---|
| 29 | | regarding deprecated PHP and library features. This allows you to get
|
---|
| 30 | | your application ready for upcoming major versions of dependencies.
|
---|
| 31 | |
|
---|
| 32 | */
|
---|
| 33 |
|
---|
| 34 | 'deprecations' => [
|
---|
| 35 | 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
---|
| 36 | 'trace' => false,
|
---|
| 37 | ],
|
---|
| 38 |
|
---|
| 39 | /*
|
---|
| 40 | |--------------------------------------------------------------------------
|
---|
| 41 | | Log Channels
|
---|
| 42 | |--------------------------------------------------------------------------
|
---|
| 43 | |
|
---|
| 44 | | Here you may configure the log channels for your application. Out of
|
---|
| 45 | | the box, Laravel uses the Monolog PHP logging library. This gives
|
---|
| 46 | | you a variety of powerful log handlers / formatters to utilize.
|
---|
| 47 | |
|
---|
| 48 | | Available Drivers: "single", "daily", "slack", "syslog",
|
---|
| 49 | | "errorlog", "monolog",
|
---|
| 50 | | "custom", "stack"
|
---|
| 51 | |
|
---|
| 52 | */
|
---|
| 53 |
|
---|
| 54 | 'channels' => [
|
---|
| 55 | 'stack' => [
|
---|
| 56 | 'driver' => 'stack',
|
---|
| 57 | 'channels' => ['single'],
|
---|
| 58 | 'ignore_exceptions' => false,
|
---|
| 59 | ],
|
---|
| 60 |
|
---|
| 61 | 'single' => [
|
---|
| 62 | 'driver' => 'single',
|
---|
| 63 | 'path' => storage_path('logs/laravel.log'),
|
---|
| 64 | 'level' => env('LOG_LEVEL', 'debug'),
|
---|
| 65 | 'replace_placeholders' => true,
|
---|
| 66 | ],
|
---|
| 67 |
|
---|
| 68 | 'daily' => [
|
---|
| 69 | 'driver' => 'daily',
|
---|
| 70 | 'path' => storage_path('logs/laravel.log'),
|
---|
| 71 | 'level' => env('LOG_LEVEL', 'debug'),
|
---|
| 72 | 'days' => 14,
|
---|
| 73 | 'replace_placeholders' => true,
|
---|
| 74 | ],
|
---|
| 75 |
|
---|
| 76 | 'slack' => [
|
---|
| 77 | 'driver' => 'slack',
|
---|
| 78 | 'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
---|
| 79 | 'username' => 'Laravel Log',
|
---|
| 80 | 'emoji' => ':boom:',
|
---|
| 81 | 'level' => env('LOG_LEVEL', 'critical'),
|
---|
| 82 | 'replace_placeholders' => true,
|
---|
| 83 | ],
|
---|
| 84 |
|
---|
| 85 | 'papertrail' => [
|
---|
| 86 | 'driver' => 'monolog',
|
---|
| 87 | 'level' => env('LOG_LEVEL', 'debug'),
|
---|
| 88 | 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
---|
| 89 | 'handler_with' => [
|
---|
| 90 | 'host' => env('PAPERTRAIL_URL'),
|
---|
| 91 | 'port' => env('PAPERTRAIL_PORT'),
|
---|
| 92 | 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
|
---|
| 93 | ],
|
---|
| 94 | 'processors' => [PsrLogMessageProcessor::class],
|
---|
| 95 | ],
|
---|
| 96 |
|
---|
| 97 | 'stderr' => [
|
---|
| 98 | 'driver' => 'monolog',
|
---|
| 99 | 'level' => env('LOG_LEVEL', 'debug'),
|
---|
| 100 | 'handler' => StreamHandler::class,
|
---|
| 101 | 'formatter' => env('LOG_STDERR_FORMATTER'),
|
---|
| 102 | 'with' => [
|
---|
| 103 | 'stream' => 'php://stderr',
|
---|
| 104 | ],
|
---|
| 105 | 'processors' => [PsrLogMessageProcessor::class],
|
---|
| 106 | ],
|
---|
| 107 |
|
---|
| 108 | 'syslog' => [
|
---|
| 109 | 'driver' => 'syslog',
|
---|
| 110 | 'level' => env('LOG_LEVEL', 'debug'),
|
---|
| 111 | 'facility' => LOG_USER,
|
---|
| 112 | 'replace_placeholders' => true,
|
---|
| 113 | ],
|
---|
| 114 |
|
---|
| 115 | 'errorlog' => [
|
---|
| 116 | 'driver' => 'errorlog',
|
---|
| 117 | 'level' => env('LOG_LEVEL', 'debug'),
|
---|
| 118 | 'replace_placeholders' => true,
|
---|
| 119 | ],
|
---|
| 120 |
|
---|
| 121 | 'null' => [
|
---|
| 122 | 'driver' => 'monolog',
|
---|
| 123 | 'handler' => NullHandler::class,
|
---|
| 124 | ],
|
---|
| 125 |
|
---|
| 126 | 'emergency' => [
|
---|
| 127 | 'path' => storage_path('logs/laravel.log'),
|
---|
| 128 | ],
|
---|
| 129 | ],
|
---|
| 130 |
|
---|
| 131 | ];
|
---|