forked from hhkbp2/go-logging
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig_example.yml
More file actions
48 lines (48 loc) · 1002 Bytes
/
config_example.yml
File metadata and controls
48 lines (48 loc) · 1002 Bytes
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
version: 1
root:
level: NOTSET
propagate: true
handlers: []
loggers:
a.b:
level: DEBUG
propagate: true
filters: [f1]
handlers: [h1]
a:
level: WARN
propagate: false
filters: [f2]
handlers: [h2]
handlers:
h1:
class: NullHandler
level: INFO
formatter: ft1
h2:
class: FileHandler
level: ERROR
filename: ./test.log
mode: O_TRUNC
bufferSize: 0
formatter: ft2
formatters:
ft1:
format: "%(asctime)s %(levelname)s %(name)s %(message)s"
datefmt: "%Y-%m-%d %H:%M:%S.%3n"
ft2:
format: "%(message)s"
type: "plain"
ft3:
datefmt: "%Y-%m-%d %H:%M:%S.%3n"
type: "json"
fields:
datetime: "%(asctime)s"
levelname: "%(levelname)s"
where: "%(filename)s:%(lineno)d"
ctxid: "%(ctxid)s"
filters:
f1:
name: a.b
f2:
name: a