| 13 |
lars |
1 |
<?php
|
|
|
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' => [
|
|
|
34 |
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
|
|
35 |
'trace' => false,
|
|
|
36 |
],
|
|
|
37 |
|
|
|
38 |
/*
|
|
|
39 |
|--------------------------------------------------------------------------
|
|
|
40 |
| Log Channels
|
|
|
41 |
|--------------------------------------------------------------------------
|
|
|
42 |
|
|
|
|
43 |
| Here you may configure the log channels for your application. Out of
|
|
|
44 |
| the box, Laravel uses the Monolog PHP logging library. This gives
|
|
|
45 |
| you a variety of powerful log handlers / formatters to utilize.
|
|
|
46 |
|
|
|
|
47 |
| Available Drivers: "single", "daily", "slack", "syslog",
|
|
|
48 |
| "errorlog", "monolog",
|
|
|
49 |
| "custom", "stack"
|
|
|
50 |
|
|
|
|
51 |
*/
|
|
|
52 |
|
|
|
53 |
'channels' => [
|
|
|
54 |
'stack' => [
|
|
|
55 |
'driver' => 'stack',
|
|
|
56 |
'channels' => ['single'],
|
|
|
57 |
'ignore_exceptions' => false,
|
|
|
58 |
],
|
|
|
59 |
|
|
|
60 |
'single' => [
|
|
|
61 |
'driver' => 'single',
|
|
|
62 |
'path' => storage_path('logs/laravel.log'),
|
|
|
63 |
'level' => env('LOG_LEVEL', 'debug'),
|
|
|
64 |
],
|
|
|
65 |
|
|
|
66 |
'daily' => [
|
|
|
67 |
'driver' => 'daily',
|
|
|
68 |
'path' => storage_path('logs/laravel.log'),
|
|
|
69 |
'level' => env('LOG_LEVEL', 'debug'),
|
|
|
70 |
'days' => 14,
|
|
|
71 |
],
|
|
|
72 |
|
|
|
73 |
'slack' => [
|
|
|
74 |
'driver' => 'slack',
|
|
|
75 |
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
|
|
76 |
'username' => 'Laravel Log',
|
|
|
77 |
'emoji' => ':boom:',
|
|
|
78 |
'level' => env('LOG_LEVEL', 'critical'),
|
|
|
79 |
],
|
|
|
80 |
|
|
|
81 |
'papertrail' => [
|
|
|
82 |
'driver' => 'monolog',
|
|
|
83 |
'level' => env('LOG_LEVEL', 'debug'),
|
|
|
84 |
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
|
|
85 |
'handler_with' => [
|
|
|
86 |
'host' => env('PAPERTRAIL_URL'),
|
|
|
87 |
'port' => env('PAPERTRAIL_PORT'),
|
|
|
88 |
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
|
|
|
89 |
],
|
|
|
90 |
],
|
|
|
91 |
|
|
|
92 |
'stderr' => [
|
|
|
93 |
'driver' => 'monolog',
|
|
|
94 |
'level' => env('LOG_LEVEL', 'debug'),
|
|
|
95 |
'handler' => StreamHandler::class,
|
|
|
96 |
'formatter' => env('LOG_STDERR_FORMATTER'),
|
|
|
97 |
'with' => [
|
|
|
98 |
'stream' => 'php://stderr',
|
|
|
99 |
],
|
|
|
100 |
],
|
|
|
101 |
|
|
|
102 |
'syslog' => [
|
|
|
103 |
'driver' => 'syslog',
|
|
|
104 |
'level' => env('LOG_LEVEL', 'debug'),
|
|
|
105 |
],
|
|
|
106 |
|
|
|
107 |
'errorlog' => [
|
|
|
108 |
'driver' => 'errorlog',
|
|
|
109 |
'level' => env('LOG_LEVEL', 'debug'),
|
|
|
110 |
],
|
|
|
111 |
|
|
|
112 |
'null' => [
|
|
|
113 |
'driver' => 'monolog',
|
|
|
114 |
'handler' => NullHandler::class,
|
|
|
115 |
],
|
|
|
116 |
|
|
|
117 |
'emergency' => [
|
|
|
118 |
'path' => storage_path('logs/laravel.log'),
|
|
|
119 |
],
|
|
|
120 |
],
|
|
|
121 |
|
|
|
122 |
];
|