Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/config/logging.php
7382 views
1
<?php
2
3
use Monolog\Handler\NullHandler;
4
use Monolog\Handler\StreamHandler;
5
use Monolog\Handler\SyslogUdpHandler;
6
use Monolog\Processor\PsrLogMessageProcessor;
7
8
return [
9
/*
10
|--------------------------------------------------------------------------
11
| Default Log Channel
12
|--------------------------------------------------------------------------
13
|
14
| This option defines the default log channel that is utilized to write
15
| messages to your logs. The value provided here should match one of
16
| the channels present in the list of "channels" configured below.
17
|
18
*/
19
20
'default' => env('LOG_CHANNEL', 'daily'),
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' => env('LOG_DEPRECATIONS_TRACE', false),
36
],
37
38
/*
39
|--------------------------------------------------------------------------
40
| Log Channels
41
|--------------------------------------------------------------------------
42
|
43
| Here you may configure the log channels for your application. Laravel
44
| utilizes the Monolog PHP logging library, which includes a variety
45
| of powerful log handlers and formatters that you're free to use.
46
|
47
| Available drivers: "single", "daily", "slack", "syslog",
48
| "errorlog", "monolog", "custom", "stack"
49
|
50
*/
51
52
'channels' => [
53
'stack' => [
54
'driver' => 'stack',
55
'channels' => explode(',', env('LOG_STACK', 'single')),
56
'ignore_exceptions' => false,
57
],
58
59
'single' => [
60
'driver' => 'single',
61
'path' => storage_path('logs/laravel.log'),
62
'level' => env('LOG_LEVEL', 'debug'),
63
'replace_placeholders' => true,
64
],
65
66
'daily' => [
67
'driver' => 'daily',
68
'path' => storage_path('logs/laravel.log'),
69
'level' => env('LOG_LEVEL', 'debug'),
70
'days' => env('LOG_DAILY_DAYS', 7),
71
'replace_placeholders' => true,
72
],
73
74
'slack' => [
75
'driver' => 'slack',
76
'url' => env('LOG_SLACK_WEBHOOK_URL'),
77
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
78
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
79
'level' => env('LOG_LEVEL', 'critical'),
80
'replace_placeholders' => true,
81
],
82
83
'papertrail' => [
84
'driver' => 'monolog',
85
'level' => env('LOG_LEVEL', 'debug'),
86
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
87
'handler_with' => [
88
'host' => env('PAPERTRAIL_URL'),
89
'port' => env('PAPERTRAIL_PORT'),
90
'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'),
91
],
92
'processors' => [PsrLogMessageProcessor::class],
93
],
94
95
'stderr' => [
96
'driver' => 'monolog',
97
'level' => env('LOG_LEVEL', 'debug'),
98
'handler' => StreamHandler::class,
99
'formatter' => env('LOG_STDERR_FORMATTER'),
100
'with' => [
101
'stream' => 'php://stderr',
102
],
103
'processors' => [PsrLogMessageProcessor::class],
104
],
105
106
'syslog' => [
107
'driver' => 'syslog',
108
'level' => env('LOG_LEVEL', 'debug'),
109
'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER),
110
'replace_placeholders' => true,
111
],
112
113
'errorlog' => [
114
'driver' => 'errorlog',
115
'level' => env('LOG_LEVEL', 'debug'),
116
'replace_placeholders' => true,
117
],
118
119
'null' => [
120
'driver' => 'monolog',
121
'handler' => NullHandler::class,
122
],
123
124
'emergency' => [
125
'path' => storage_path('logs/laravel.log'),
126
],
127
],
128
];
129
130