You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
access_log {{ 'off' if not log else log['path'] if log['path'] is defined }}{{ (' ' + log['format'] | string) if log['format'] is defined -}}
192
-
{{- (' buffer=' + log['buffer'] | string) if log['buffer'] is defined -}}
193
-
{{- ' gzip' if log['gzip'] is defined and log['access']['gzip'] is boolean and log['gzip'] | bool else (' gzip=' + log['gzip'] | string) if log['gzip'] is defined and log['gzip'] is string -}}
194
-
{{- (' flush=' + log['flush'] | string) if log['flush'] is defined -}}
195
-
{{- (' if=' + log['if']) if log['if'] is defined }};
190
+
{%foraccess_iteminlog['access'] %}
191
+
access_log {{ 'off' if not access_item else access_item['path'] if access_item['path'] is defined }}{{ (' ' + access_item['format'] | string) if access_item['format'] is defined -}}
192
+
{{- (' buffer=' + access_item['buffer'] | string) if access_item['buffer'] is defined -}}
193
+
{{- ' gzip' if access_item['gzip'] is defined and access_item['gzip'] is boolean and access_item['gzip'] | bool else (' gzip=' + access_item['gzip'] | string) if access_item['gzip'] is defined -}}
194
+
{{- (' flush=' + access_item['flush'] | string) if access_item['flush'] is defined -}}
195
+
{{- (' if=' + access_item['if']) if access_item['if'] is defined }};
196
196
{%endfor%}
197
197
{%endif%}
198
198
{%iflog['error'] isdefined%}{# This does not belong here but we are making an exception #}
199
-
{%forloginlog['error'] if (log['error'] isnotmappingandlog['error'] isnotstring) %}
200
-
error_log {{ log if log is string else log['file'] }}{{ (' ' + log['level'] | string) if log['level'] is defined }};
199
+
{%forerror_iteminlog['error'] if (log['error'] isnotmappingandlog['error'] isnotstring) %}
200
+
error_log {{ error_item if error_item is string else error_item['file'] }}{{ (' ' + error_item['level'] | string) if error_item['level'] is defined }};
201
201
{%else%}
202
202
error_log {{ log['error'] if log['error'] is string else log['error']['file'] }}{{ (' ' + log['error']['level'] | string) if log['error']['level'] is defined }};
0 commit comments