Skip to content

Commit 2b89eff

Browse files
committed
Add the new logging config
1 parent 5382939 commit 2b89eff

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

config/logging.php

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?php
2+
3+
use Monolog\Handler\StreamHandler;
4+
5+
return [
6+
7+
/*
8+
|--------------------------------------------------------------------------
9+
| Default Log Channel
10+
|--------------------------------------------------------------------------
11+
|
12+
| This option defines the default log channel that gets used when writing
13+
| messages to the logs. The name specified in this option should match
14+
| one of the channels defined in the "channels" configuration array.
15+
|
16+
*/
17+
18+
'default' => env('LOG_CHANNEL', 'daily'),
19+
20+
/*
21+
|--------------------------------------------------------------------------
22+
| Log Channels
23+
|--------------------------------------------------------------------------
24+
|
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+
|
29+
| Available Drivers: "single", "daily", "slack", "syslog",
30+
| "errorlog", "monolog",
31+
| "custom", "stack"
32+
|
33+
*/
34+
35+
'channels' => [
36+
'stack' => [
37+
'driver' => 'stack',
38+
'channels' => ['single'],
39+
],
40+
41+
'single' => [
42+
'driver' => 'single',
43+
'path' => storage_path('logs/laravel.log'),
44+
'level' => 'debug',
45+
],
46+
47+
'daily' => [
48+
'driver' => 'daily',
49+
'path' => storage_path('logs/laravel.log'),
50+
'level' => 'debug',
51+
'days' => 7,
52+
],
53+
54+
'slack' => [
55+
'driver' => 'slack',
56+
'url' => env('LOG_SLACK_WEBHOOK_URL'),
57+
'username' => 'Laravel Log',
58+
'emoji' => ':boom:',
59+
'level' => 'critical',
60+
],
61+
62+
'stderr' => [
63+
'driver' => 'monolog',
64+
'handler' => StreamHandler::class,
65+
'with' => [
66+
'stream' => 'php://stderr',
67+
],
68+
],
69+
70+
'syslog' => [
71+
'driver' => 'syslog',
72+
'level' => 'debug',
73+
],
74+
75+
'errorlog' => [
76+
'driver' => 'errorlog',
77+
'level' => 'debug',
78+
],
79+
],
80+
81+
];

0 commit comments

Comments
 (0)