Mercurial > hg > nginx-site
comparison xml/ru/docs/stream/ngx_stream_log_module.xml @ 1874:33f742032155
Documented support for json escaping in log_format.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 20 Dec 2016 18:44:33 +0300 |
parents | 19eb203ffd41 |
children | 0b339643b08f |
comparison
equal
deleted
inserted
replaced
1873:2f851f71ff08 | 1874:33f742032155 |
---|---|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
8 | 8 |
9 <module name="Модуль ngx_stream_log_module" | 9 <module name="Модуль ngx_stream_log_module" |
10 link="/ru/docs/stream/ngx_stream_log_module.html" | 10 link="/ru/docs/stream/ngx_stream_log_module.html" |
11 lang="ru" | 11 lang="ru" |
12 rev="3"> | 12 rev="4"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 Модуль <literal>ngx_stream_log_module</literal> (1.11.4) записывает логи сессий | 17 Модуль <literal>ngx_stream_log_module</literal> (1.11.4) записывает логи сессий |
153 | 153 |
154 | 154 |
155 <directive name="log_format"> | 155 <directive name="log_format"> |
156 <syntax> | 156 <syntax> |
157 <value>название</value> | 157 <value>название</value> |
158 [<literal>escape</literal>=<value>default</value>|<value>json</value>] | |
158 <value>строка</value> ...</syntax> | 159 <value>строка</value> ...</syntax> |
159 <default></default> | 160 <default></default> |
160 <context>stream</context> | 161 <context>stream</context> |
161 | 162 |
162 <para> | 163 <para> |
165 log_format proxy '$remote_addr [$time_local] ' | 166 log_format proxy '$remote_addr [$time_local] ' |
166 '$protocol $status $bytes_sent $bytes_received ' | 167 '$protocol $status $bytes_sent $bytes_received ' |
167 '$session_time "$upstream_addr" ' | 168 '$session_time "$upstream_addr" ' |
168 '"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"'; | 169 '"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"'; |
169 </example> | 170 </example> |
171 </para> | |
172 | |
173 <para id="log_format_escape"> | |
174 Параметр <literal>escape</literal> (1.11.8) позволяет задать | |
175 экранирование символов <value>json</value> или <value>default</value> | |
176 в переменных, | |
177 по умолчанию используется <value>default</value>. | |
170 </para> | 178 </para> |
171 | 179 |
172 </directive> | 180 </directive> |
173 | 181 |
174 | 182 |