-
Notifications
You must be signed in to change notification settings - Fork 0
/
logger.config
130 lines (124 loc) · 4.56 KB
/
logger.config
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
%%
%% advanced.config logger configuration
%%
[
{kernel, [
{logger_level, info},
%% Records most events at 'logger_level' or higher
%% Excludes crashes (crash.log) and SASL (report.log)
{logger, [
{handler, default, logger_std_h, #{
level => all,
config => #{
file => "{{platform_log_dir}}/console.log",
file_check => 100,
max_no_bytes => 1048576,
max_no_files => 10
},
filter_default => log,
filters => [
{default_filter, {fun riak_logger:filter_ces/2, stop}}
],
formatter => {logger_formatter, #{
legacy_header => false,
single_line => true,
time_designator => $\s,
template => [
time, " [", level, "] ", {pid, [pid, "@"], []},
{mfa, [mfa, ":"], []}, {line, [line, ":"], []},
" ", msg, "\n"
]
}}
}},
%% Records all events at 'error' level or higher
{handler, error_log, logger_std_h, #{
level => error,
config => #{
file => "{{platform_log_dir}}/error.log",
file_check => 100,
max_no_bytes => 1048576,
max_no_files => 10
},
filter_default => log,
filters => [],
formatter => {logger_formatter, #{
legacy_header => false,
single_line => true,
time_designator => $\s,
template => [
time, " [", level, "] ", {pid, [pid, "@"], []},
{mfa, [mfa, ":"], []}, {line, [line, ":"], []},
" ", msg, "\n"
]
}}
}},
%% Records process crashes
{handler, crash_log, logger_std_h, #{
level => all,
config => #{
file => "{{platform_log_dir}}/crash.log",
file_check => 100,
max_no_bytes => 1048576,
max_no_files => 10
},
filter_default => stop,
filters => [
{crash_filter, {fun riak_logger:filter_ce/2, log}}
],
formatter => {logger_formatter, #{
legacy_header => false,
single_line => false,
time_designator => $\s,
template => [
time, " [", level, "] ", {pid, [pid, "@"], []},
{mfa, [mfa, ":"], []}, {line, [line, ":"], []},
" ", msg, "\n"
]
}}
}},
%% Records progress and SASL reports
{handler, report_log, logger_std_h, #{
level => info,
config => #{
file => "{{platform_log_dir}}/report.log",
file_check => 100,
max_no_bytes => 1048576,
max_no_files => 10
},
filter_default => stop,
filters => [
{report_filter, {fun riak_logger:filter_ps/2, log}}
],
formatter => {logger_formatter, #{
legacy_header => false,
single_line => false,
time_designator => $\s,
template => [
time, " [", level, "] ", {pid, [pid, "@"], []},
{mfa, [mfa, ":"], []}, {line, [line, ":"], []},
" ", msg, "\n"
]
}}
}}
]}
]},
{syslog, [
%% openlog initialization values
{identity, "riak"},
{facility, daemon},
{options, [pid, cons]},
%% Records most events at 'info' level or higher to syslog
%% Excludes reports (report.log)
{logger, [
{handler, syslog, syslog, #{
level => info,
config => daemon,
filter_default => log,
filters => [
{syslog_filter, {fun riak_logger:filter_ps/2, stop}}
],
formatter => {syslog, #{max_size => 512}}
}}
]}
]}
].