source: config/logging.php@ dfae77e

Last change on this file since dfae77e was dfae77e, checked in by Igor Danilovski <igor_danilovski@…>, 22 months ago
  • Initial commit;
  • Property mode set to 100644
File size: 3.5 KB
Line 
1<?php
2
3use Monolog\Handler\NullHandler;
4use Monolog\Handler\StreamHandler;
5use Monolog\Handler\SyslogUdpHandler;
6
7return [
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 'daily' => [
64 'driver' => 'daily',
65 'path' => storage_path('logs/laravel.log'),
66 'level' => env('LOG_LEVEL', 'debug'),
67 'days' => 14,
68 ],
69
70 'slack' => [
71 'driver' => 'slack',
72 'url' => env('LOG_SLACK_WEBHOOK_URL'),
73 'username' => 'Laravel Log',
74 'emoji' => ':boom:',
75 'level' => env('LOG_LEVEL', 'critical'),
76 ],
77
78 'papertrail' => [
79 'driver' => 'monolog',
80 'level' => env('LOG_LEVEL', 'debug'),
81 'handler' => SyslogUdpHandler::class,
82 'handler_with' => [
83 'host' => env('PAPERTRAIL_URL'),
84 'port' => env('PAPERTRAIL_PORT'),
85 ],
86 ],
87
88 'stderr' => [
89 'driver' => 'monolog',
90 'level' => env('LOG_LEVEL', 'debug'),
91 'handler' => StreamHandler::class,
92 'formatter' => env('LOG_STDERR_FORMATTER'),
93 'with' => [
94 'stream' => 'php://stderr',
95 ],
96 ],
97
98 'syslog' => [
99 'driver' => 'syslog',
100 'level' => env('LOG_LEVEL', 'debug'),
101 ],
102
103 'errorlog' => [
104 'driver' => 'errorlog',
105 'level' => env('LOG_LEVEL', 'debug'),
106 ],
107
108 'null' => [
109 'driver' => 'monolog',
110 'handler' => NullHandler::class,
111 ],
112
113 'emergency' => [
114 'path' => storage_path('logs/laravel.log'),
115 ],
116 ],
117
118];
Note: See TracBrowser for help on using the repository browser.