-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
yaml
107 lines (94 loc) · 1.75 KB
/
yaml
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
# Check how the empty config pretty-prints itself.
yaml
----
{}
# Verify that it's possible to only pass a subset
# of the fields in the YAML input.
yaml
capture-stray-errors:
enable: true
sinks:
file-groups:
auth:
dir: /hello/world
----
sinks:
file-groups:
auth:
dir: /hello/world
capture-stray-errors:
enable: true
# Verify that a channel can be selected.
yaml
sinks:
stderr:
channels: DEV
----
sinks:
stderr:
channels: DEV
# Verify that more than one channel can be selected.
yaml
sinks:
stderr:
channels: DEV,SESSIONS
----
sinks:
stderr:
channels: DEV,SESSIONS
# Verify that all channels can be selected.
yaml
sinks:
stderr:
channels: all
----
sinks:
stderr:
channels: all
# Verify that the inverse of a channel list can be selected.
yaml
sinks: { stderr: { channels: 'all except DEV,SESSIONS' } }
----
sinks:
stderr:
channels: OPS,HEALTH,STORAGE,SENSITIVE_ACCESS,SQL_EXEC,SQL_PERF,SQL_INTERNAL_PERF
# Try populating all the fields.
yaml
file-defaults:
dir: /default/dir
filter: ERROR
redact: true
redactable: false
max-file-size: 10MB
max-group-size: 100MB
sinks:
file-groups:
auth:
dir: /hello/world
max-group-size: 1GB
debug:
dir: universe
max-file-size: 1MB
perf:
filter: INFO
redact: true
stderr:
filter: WARNING
redact: false
redactable: true
fluent-servers:
default:
address: 127.0.0.1:5170
other:
net: udp
address: 127.0.0.1:5111
----
ERROR: yaml: unmarshal errors:
line 26: field fluent-servers not found in type logconfig.SinkConfig
# Check that duplicate channels are refused.
yaml
sinks:
stderr:
channels: DEV,DEV
----
ERROR: duplicate channel name: "DEV"