Skip to content

Commit 9bcd355

Browse files
committed
MINOR: configuration: update examples with log_targets
1 parent f160aca commit 9bcd355

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

configuration/examples/example-full.hcl

+30-1
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,42 @@ service_discovery {
104104
aws_regions = []
105105
}
106106

107+
log_targets = [
108+
{
109+
log_to = "stdout"
110+
log_level = "debug"
111+
log_format = "json"
112+
log_types = [
113+
"access",
114+
"app",
115+
]
116+
},
117+
{
118+
log_to = "file"
119+
log_file = "/var/log/dataplanepi.log"
120+
log_level = "info"
121+
log_format = "text"
122+
log_types = ["app"]
123+
},
124+
{
125+
log_to = "syslog"
126+
log_level = "info"
127+
syslog_address = "127.0.0.1"
128+
syslog_protocol = "tcp"
129+
syslog_tag = "dataplaneapi"
130+
syslog_level = "debug"
131+
syslog_facillity = "local0"
132+
log_types = ["access"]
133+
},
134+
]
135+
136+
# Deprecated: use log_targets instead
107137
log {
108138
log_to = "stdout"
109139
log_file = "/var/log/dataplaneapi/dataplaneapi.log"
110140
log_level = "warning"
111141
log_format = "text"
112142
apache_common_log_format = "%h"
113-
log_targets = "null"
114143

115144
syslog {
116145
syslog_address = "null"

configuration/examples/example-full.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,29 @@ cluster:
8383
service_discovery:
8484
consuls: [] # []*models.Consul
8585
aws_regions: [] # []*models.AwsRegion
86+
log_targets:
87+
- log_to: stdout
88+
log_level: debug
89+
log_format: json
90+
log_types:
91+
- access
92+
- app
93+
- log_to: file
94+
log_file: /var/log/dataplanepi.log
95+
log_level: info
96+
log_format: text
97+
log_types:
98+
- app
99+
- log_to: syslog
100+
log_level: info
101+
syslog_address: 127.0.0.1
102+
syslog_protocol: tcp
103+
syslog_tag: dataplaneapi
104+
syslog_level: debug
105+
syslog_facility: local0
106+
log_types:
107+
- access
108+
# Deprecated: use log_targets instead
86109
log:
87110
log_to: "stdout" # string
88111
log_file: "/var/log/dataplaneapi/dataplaneapi.log" # string

0 commit comments

Comments
 (0)