Merge pull request #5348 from Antiarchitect/stream-log-annotations
Ability to separately disable access log in http and stream contexts
This commit is contained in:
commit
8d45bb39a4
3 changed files with 94 additions and 4 deletions
|
|
@ -338,7 +338,7 @@ http {
|
|||
default 1;
|
||||
}
|
||||
|
||||
{{ if $cfg.DisableAccessLog }}
|
||||
{{ if or $cfg.DisableAccessLog $cfg.DisableHTTPAccessLog }}
|
||||
access_log off;
|
||||
{{ else }}
|
||||
{{ if $cfg.EnableSyslog }}
|
||||
|
|
@ -702,7 +702,7 @@ stream {
|
|||
|
||||
log_format log_stream '{{ $cfg.LogFormatStream }}';
|
||||
|
||||
{{ if $cfg.DisableAccessLog }}
|
||||
{{ if or $cfg.DisableAccessLog $cfg.DisableStreamAccessLog }}
|
||||
access_log off;
|
||||
{{ else }}
|
||||
access_log {{ or $cfg.StreamAccessLogPath $cfg.AccessLogPath }} log_stream {{ $cfg.AccessLogParams }};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue