]> BookStack Code Mirror - bookstack/blob - app/Config/logging.php
880b35453b4c8970a2f1e5991cf63404b9c2a17e
[bookstack] / app / Config / logging.php
1 <?php
2
3 use Monolog\Handler\StreamHandler;
4
5 /**
6  * Logging configuration options.
7  *
8  * Changes to these config files are not supported by BookStack and may break upon updates.
9  * Configuration should be altered via the `.env` file or environment variables.
10  * Do not edit this file unless you're happy to maintain any changes yourself.
11  */
12
13 return [
14
15     // Default Log Channel
16     // This option defines the default log channel that gets used when writing
17     // messages to the logs. The name specified in this option should match
18     // one of the channels defined in the "channels" configuration array.
19     'default' => env('LOG_CHANNEL', 'single'),
20
21     // Log Channels
22     // Here you may configure the log channels for your application. Out of
23     // the box, Laravel uses the Monolog PHP logging library. This gives
24     // you a variety of powerful log handlers / formatters to utilize.
25     // Available Drivers: "single", "daily", "slack", "syslog",
26     //                    "errorlog", "monolog",
27     //                    "custom", "stack"
28     'channels' => [
29         'stack' => [
30             'driver' => 'stack',
31             'channels' => ['single'],
32         ],
33
34         'single' => [
35             'driver' => 'single',
36             'path' => storage_path('logs/laravel.log'),
37             'level' => 'debug',
38         ],
39
40         'daily' => [
41             'driver' => 'daily',
42             'path' => storage_path('logs/laravel.log'),
43             'level' => 'debug',
44             'days' => 7,
45         ],
46
47         'slack' => [
48             'driver' => 'slack',
49             'url' => env('LOG_SLACK_WEBHOOK_URL'),
50             'username' => 'Laravel Log',
51             'emoji' => ':boom:',
52             'level' => 'critical',
53         ],
54
55         'stderr' => [
56             'driver' => 'monolog',
57             'handler' => StreamHandler::class,
58             'with' => [
59                 'stream' => 'php://stderr',
60             ],
61         ],
62
63         'syslog' => [
64             'driver' => 'syslog',
65             'level' => 'debug',
66         ],
67
68         'errorlog' => [
69             'driver' => 'errorlog',
70             'level' => 'debug',
71         ],
72     ],
73
74 ];