Mercurial > hg > nginx-site
comparison xml/en/docs/stream/ngx_stream_log_module.xml @ 2540:b686736680e3
Documented escaping rules in log_format.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 12 May 2020 22:06:12 +0100 |
parents | dab82d534f0f |
children | eeed494bba51 |
comparison
equal
deleted
inserted
replaced
2539:5a5a791b3166 | 2540:b686736680e3 |
---|---|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
8 | 8 |
9 <module name="Module ngx_stream_log_module" | 9 <module name="Module ngx_stream_log_module" |
10 link="/en/docs/stream/ngx_stream_log_module.html" | 10 link="/en/docs/stream/ngx_stream_log_module.html" |
11 lang="en" | 11 lang="en" |
12 rev="6"> | 12 rev="7"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 The <literal>ngx_stream_log_module</literal> module (1.11.4) writes session logs | 17 The <literal>ngx_stream_log_module</literal> module (1.11.4) writes session logs |
175 <literal>json</literal> or <literal>default</literal> characters escaping | 175 <literal>json</literal> or <literal>default</literal> characters escaping |
176 in variables, by default, <literal>default</literal> escaping is used. | 176 in variables, by default, <literal>default</literal> escaping is used. |
177 The <literal>none</literal> parameter (1.13.10) disables escaping. | 177 The <literal>none</literal> parameter (1.13.10) disables escaping. |
178 </para> | 178 </para> |
179 | 179 |
180 <para id="log_format_escape_default"> | |
181 For <literal>default</literal> escaping, | |
182 characters “<literal>"</literal>”, “<literal>\</literal>”, | |
183 and other characters with values less than 32 or above 126 | |
184 are escaped as “<literal>\xXX</literal>”. | |
185 If the variable value is not found, | |
186 a hyphen (“<literal>-</literal>”) will be logged. | |
187 </para> | |
188 | |
189 <para id="log_format_escape_json"> | |
190 For <literal>json</literal> escaping, | |
191 all characters not allowed | |
192 in JSON <link url="https://tools.ietf.org/html/rfc8259#section-7">strings</link> | |
193 will be escaped: | |
194 characters “<literal>"</literal>” and | |
195 “<literal>\</literal>” are escaped as | |
196 “<literal>\"</literal>” and “<literal>\\</literal>”, | |
197 characters with values less than 32 are escaped as | |
198 “<literal>\n</literal>”, | |
199 “<literal>\r</literal>”, | |
200 “<literal>\t</literal>”, | |
201 “<literal>\b</literal>”, | |
202 “<literal>\f</literal>”, or | |
203 “<literal>\u00XX</literal>”. | |
204 </para> | |
205 | |
180 </directive> | 206 </directive> |
181 | 207 |
182 | 208 |
183 <directive name="open_log_file_cache"> | 209 <directive name="open_log_file_cache"> |
184 | 210 |