Adds support for disabling the entire access_log
This commit is contained in:
parent
2119b23cb8
commit
d0c4e0d713
4 changed files with 19 additions and 0 deletions
|
|
@ -87,7 +87,11 @@ http {
|
|||
default 1;
|
||||
}
|
||||
|
||||
{{ if $cfg.DisableAccessLog }}
|
||||
access_log off;
|
||||
{{ else }}
|
||||
access_log /var/log/nginx/access.log upstreaminfo if=$loggable;
|
||||
{{ end }}
|
||||
error_log /var/log/nginx/error.log {{ $cfg.ErrorLogLevel }};
|
||||
|
||||
{{ buildResolvers $cfg.Resolver }}
|
||||
|
|
@ -424,7 +428,12 @@ stream {
|
|||
|
||||
log_format log_stream '$remote_addr [$time_local] $protocol [$ssl_preread_server_name] [$stream_upstream] $status $bytes_sent $bytes_received $session_time';
|
||||
|
||||
{{ if $cfg.DisableAccessLog }}
|
||||
access_log off;
|
||||
{{ else }}
|
||||
access_log /var/log/nginx/access.log log_stream;
|
||||
{{ end }}
|
||||
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
# configure default backend for SSL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue