# HG changeset patch # User Yaroslav Zhuravlev # Date 1482248673 -10800 # Node ID 33f74203215587c63dd6402ef768bfa6b50291c0 # Parent 2f851f71ff0816783b76200403cfb172ebbcc883 Documented support for json escaping in log_format. diff --git a/xml/en/docs/http/ngx_http_log_module.xml b/xml/en/docs/http/ngx_http_log_module.xml --- a/xml/en/docs/http/ngx_http_log_module.xml +++ b/xml/en/docs/http/ngx_http_log_module.xml @@ -10,7 +10,7 @@ + rev="16">
@@ -194,6 +194,7 @@ access_log /path/to/access.log combined name + [escape=default|json] string ... combined "..." http @@ -202,6 +203,12 @@ access_log /path/to/access.log combined Specifies log format. + +The escape parameter (1.11.8) allows setting +json or default characters escaping in variables, +by default, default escaping is used. + + The log format can contain common variables, and variables that exist only at the time of a log write: diff --git a/xml/en/docs/stream/ngx_stream_log_module.xml b/xml/en/docs/stream/ngx_stream_log_module.xml --- a/xml/en/docs/stream/ngx_stream_log_module.xml +++ b/xml/en/docs/stream/ngx_stream_log_module.xml @@ -9,7 +9,7 @@ + rev="4">
@@ -155,6 +155,7 @@ or an empty string. name + [escape=default|json] string ... stream @@ -169,6 +170,12 @@ log_format proxy '$remote_addr [$time_lo + +The escape parameter (1.11.8) allows setting +json or default characters escaping in variables, +by default, default escaping is used. + + diff --git a/xml/ru/docs/http/ngx_http_log_module.xml b/xml/ru/docs/http/ngx_http_log_module.xml --- a/xml/ru/docs/http/ngx_http_log_module.xml +++ b/xml/ru/docs/http/ngx_http_log_module.xml @@ -10,7 +10,7 @@ + rev="16">
@@ -192,6 +192,7 @@ access_log /path/to/access.log combined название + [escape=default|json] строка ... combined "..." http @@ -200,6 +201,13 @@ access_log /path/to/access.log combined Задаёт формат лога. + +Параметр escape (1.11.8) позволяет задать +экранирование символов json или default +в переменных, +по умолчанию используется default. + + Кроме общих переменных в формате можно использовать переменные, существующие только на момент записи в лог: diff --git a/xml/ru/docs/stream/ngx_stream_log_module.xml b/xml/ru/docs/stream/ngx_stream_log_module.xml --- a/xml/ru/docs/stream/ngx_stream_log_module.xml +++ b/xml/ru/docs/stream/ngx_stream_log_module.xml @@ -9,7 +9,7 @@ + rev="4">
@@ -155,6 +155,7 @@ access_log /path/to/log.gz basic gzip fl название + [escape=default|json] строка ... stream @@ -169,6 +170,13 @@ log_format proxy '$remote_addr [$time_lo + +Параметр escape (1.11.8) позволяет задать +экранирование символов json или default +в переменных, +по умолчанию используется default. + +