Add option in the configuration configmap to enable remote logging (syslog) (#2145)
This commit is contained in:
parent
0dee303ac2
commit
216fe01a07
2 changed files with 17 additions and 0 deletions
|
|
@ -150,9 +150,18 @@ http {
|
|||
{{ if $cfg.DisableAccessLog }}
|
||||
access_log off;
|
||||
{{ else }}
|
||||
{{ if $cfg.EnableSyslog }}
|
||||
access_log syslog:server={{ $cfg.SyslogHost }}:{{ $cfg.SyslogPort }} upstreaminfo if=$loggable;
|
||||
{{ else }}
|
||||
access_log {{ $cfg.AccessLogPath }} upstreaminfo if=$loggable;
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $cfg.EnableSyslog }}
|
||||
error_log syslog:server={{ $cfg.SyslogHost }}:{{ $cfg.SyslogPort }} {{ $cfg.ErrorLogLevel }};
|
||||
{{ else }}
|
||||
error_log {{ $cfg.ErrorLogPath }} {{ $cfg.ErrorLogLevel }};
|
||||
{{ end }}
|
||||
|
||||
{{ buildResolvers $cfg.Resolver $cfg.DisableIpv6DNS }}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue