-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp-logger.php
100 lines (85 loc) · 3.01 KB
/
app-logger.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
return [
'http' => [
'enabled' => env('RUN_HTTP_LOG', true),
/*
* The log profile which determines whether a request should be logged.
* It should implement `HttpLogProfile`.
*/
'log_profile' => \KitLoong\AppLogger\HttpLog\LogProfile::class,
/*
* The log writer used to write the request to a log.
* It should implement `HttpLogWriter`.
*/
'log_writer' => \KitLoong\AppLogger\HttpLog\LogWriter::class,
/*
* If you are using default `HttpLogProfile` provided by the package,
* you could define which HTTP methods should be logged.
*/
'should_log' => [
\Illuminate\Http\Request::METHOD_POST,
\Illuminate\Http\Request::METHOD_PUT,
\Illuminate\Http\Request::METHOD_PATCH,
\Illuminate\Http\Request::METHOD_DELETE,
],
/*
* Filter out body fields which will never be logged.
*/
'except' => [
'password',
'password_confirmation',
],
/*
* Log channel name define in config/logging.php
* null value to use default channel.
*/
'channel' => null,
],
'performance' => [
'enabled' => env('RUN_PERFORMANCE_LOG', true),
/*
* The log profile which determines whether a request should be logged.
* It should implement `PerformanceLogProfile`.
*/
'log_profile' => \KitLoong\AppLogger\PerformanceLog\LogProfile::class,
/*
* The log writer used to write the request to a log.
* It should implement `PerformanceLogWriter`.
*/
'log_writer' => \KitLoong\AppLogger\PerformanceLog\LogWriter::class,
/*
* If you are using default `PerformanceLogProfile` provided by the package,
* you could define which HTTP methods should be logged.
*/
'should_log' => [
\Illuminate\Http\Request::METHOD_GET,
\Illuminate\Http\Request::METHOD_POST,
\Illuminate\Http\Request::METHOD_PUT,
\Illuminate\Http\Request::METHOD_PATCH,
\Illuminate\Http\Request::METHOD_DELETE,
],
/*
* Log channel name define in config/logging.php
* null value to use default channel.
*/
'channel' => null,
],
'query' => [
'enabled' => env('RUN_QUERY_LOG', false),
/*
* The log profile which determines whether query should be logged.
* It should implement `QueryLogProfile`.
*/
'log_profile' => \KitLoong\AppLogger\QueryLog\LogProfile::class,
/*
* The log writer used to write the query to a log.
* It should implement `QueryLogWriter`.
*/
'log_writer' => \KitLoong\AppLogger\QueryLog\LogWriter::class,
/*
* Log channel name define in config/logging.php
* null value to use default channel.
*/
'channel' => null,
],
];