]> BookStack Code Mirror - bookstack/blob - app/Config/logging.php
Fixed occurances of altered titles in search results
[bookstack] / app / Config / logging.php
1 <?php
2
3 use Monolog\Formatter\LineFormatter;
4 use Monolog\Handler\ErrorLogHandler;
5 use Monolog\Handler\NullHandler;
6 use Monolog\Handler\StreamHandler;
7
8 /**
9  * Logging configuration options.
10  *
11  * Changes to these config files are not supported by BookStack and may break upon updates.
12  * Configuration should be altered via the `.env` file or environment variables.
13  * Do not edit this file unless you're happy to maintain any changes yourself.
14  */
15
16 return [
17
18     // Default Log Channel
19     // This option defines the default log channel that gets used when writing
20     // messages to the logs. The name specified in this option should match
21     // one of the channels defined in the "channels" configuration array.
22     'default' => env('LOG_CHANNEL', 'single'),
23
24     // Log Channels
25     // Here you may configure the log channels for your application. Out of
26     // the box, Laravel uses the Monolog PHP logging library. This gives
27     // you a variety of powerful log handlers / formatters to utilize.
28     // Available Drivers: "single", "daily", "slack", "syslog",
29     //                    "errorlog", "monolog",
30     //                    "custom", "stack"
31     'channels' => [
32         'stack' => [
33             'driver'            => 'stack',
34             'channels'          => ['daily'],
35             'ignore_exceptions' => false,
36         ],
37
38         'single' => [
39             'driver' => 'single',
40             'path'   => storage_path('logs/laravel.log'),
41             'level'  => 'debug',
42             'days'   => 14,
43         ],
44
45         'daily' => [
46             'driver' => 'daily',
47             'path'   => storage_path('logs/laravel.log'),
48             'level'  => 'debug',
49             'days'   => 7,
50         ],
51
52         'stderr' => [
53             'driver'  => 'monolog',
54             'level'   => 'debug',
55             'handler' => StreamHandler::class,
56             'with'    => [
57                 'stream' => 'php://stderr',
58             ],
59         ],
60
61         'syslog' => [
62             'driver' => 'syslog',
63             'level'  => 'debug',
64         ],
65
66         'errorlog' => [
67             'driver' => 'errorlog',
68             'level'  => 'debug',
69         ],
70
71         // Custom errorlog implementation that logs out a plain,
72         // non-formatted message intended for the webserver log.
73         'errorlog_plain_webserver' => [
74             'driver'         => 'monolog',
75             'level'          => 'debug',
76             'handler'        => ErrorLogHandler::class,
77             'handler_with'   => [4],
78             'formatter'      => LineFormatter::class,
79             'formatter_with' => [
80                 'format' => '%message%',
81             ],
82         ],
83
84         'null' => [
85             'driver'  => 'monolog',
86             'handler' => NullHandler::class,
87         ],
88
89         // Testing channel
90         // Uses a shared testing instance during tests
91         // so that logs can be checked against.
92         'testing' => [
93             'driver' => 'testing',
94         ],
95
96         'emergency' => [
97             'path' => storage_path('logs/laravel.log'),
98         ],
99     ],
100
101     // Failed Login Message
102     // Allows a configurable message to be logged when a login request fails.
103     'failed_login' => [
104         'message' => env('LOG_FAILED_LOGIN_MESSAGE', null),
105         'channel' => env('LOG_FAILED_LOGIN_CHANNEL', 'errorlog_plain_webserver'),
106     ],
107
108 ];
Morty Proxy This is a proxified and sanitized view of the page, visit original site.