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:
Kubernetes Prow Robot 2020-09-28 11:02:53 -07:00 committed by GitHub
commit 8d45bb39a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 94 additions and 4 deletions

View file

@ -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 }};