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