1
0

conf: improve logging configuration

- both "error_log()" and "access_log()" now support "syslog:" prefix
- "error_log()" supports "stderr" destination
- both "error_log()" and "access_log()" now support "off" destination (with minor notes for "error_log()")
This commit is contained in:
2025-06-06 11:36:17 +03:00
parent d0ae5d79c9
commit 50d0bbeedf
3 changed files with 37 additions and 16 deletions

View File

@@ -1,4 +1,3 @@
{%- import 'snip/log.j2mod' as ngx_log -%}
{# {{ ngx_log.error_log(dest='error.log', level=env.NGX_LOGLEVEL) }} #}
{{ ngx_log.error_log(level=env.NGX_LOGLEVEL) }}
{%- import 'snip/log.j2mod' as _log -%}
{#- {{ _log.error_log(dest='error.log', level=env.NGX_LOGLEVEL) }} -#}
{{ _log.error_log(level=env.NGX_LOGLEVEL) }}

View File

@@ -1,4 +1,3 @@
{%- import 'snip/log.j2mod' as ngx_log -%}
{# {{ ngx_log.access_log(dest='access.log', format='main') }} #}
{{ ngx_log.access_log(format='main') }}
{%- import 'snip/log.j2mod' as _log -%}
{#- {{ _log.access_log(dest='access.log', format='main') }} -#}
{{ _log.access_log(format='main') }}