changeset 516:8e1356bd281a

Documented the "debug_connection" directive.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 14 May 2012 11:29:39 +0000
parents 1569ce935ea3
children dba57bb42fec
files xml/en/docs/debugging_log.xml xml/en/docs/ngx_core_module.xml xml/ru/docs/debugging_log.xml xml/ru/docs/ngx_core_module.xml
diffstat 4 files changed, 80 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/debugging_log.xml	Fri May 11 12:51:02 2012 +0000
+++ b/xml/en/docs/debugging_log.xml	Mon May 14 11:29:39 2012 +0000
@@ -55,7 +55,9 @@
 </para>
 
 <para>
-It is also possible to enable the debugging log for selected addresses only:
+It is also possible to enable the debugging log for
+<link doc="ngx_core_module.xml" id="debug_connection">selected
+client addresses</link> only:
 
 <programlisting>
 error_log /path/to/log;
--- a/xml/en/docs/ngx_core_module.xml	Fri May 11 12:51:02 2012 +0000
+++ b/xml/en/docs/ngx_core_module.xml	Mon May 14 11:29:39 2012 +0000
@@ -42,6 +42,43 @@
 </directive>
 
 
+<directive name="debug_connection">
+<syntax>
+    <value>address</value> |
+    <value>CIDR</value> |
+    <literal>unix:</literal></syntax>
+<default/>
+<context>events</context>
+
+<para>
+Enables debugging log for selected client connections.
+Other connections will use logging level set by the
+<link id="error_log"/> directive.
+Debugged connections are specified by IPv4 or IPv6 (1.3.0) address or network.
+A connection may also be specified using a hostname, in which case the
+first IPv4 address corresponding to a name is used.
+For connections using UNIX-domain sockets (1.3.0), debugging log is enabled
+by the “<literal>unix:</literal>” parameter.
+<example>
+events {
+    debug_connection 127.0.0.1;
+    debug_connection localhost;
+    debug_connection 192.0.2.0/24;
+    debug_connection ::1;
+    debug_connection 2001:0db8::/32;
+    debug_connection unix:;
+    ...
+}
+</example>
+<note>
+For this directive to work, nginx needs to
+be built with <literal>--with-debug</literal>.
+</note>
+</para>
+
+</directive>
+
+
 <directive name="error_log">
 <syntax>
 <value>file</value> | <literal>stderr</literal>
--- a/xml/ru/docs/debugging_log.xml	Fri May 11 12:51:02 2012 +0000
+++ b/xml/ru/docs/debugging_log.xml	Mon May 14 11:29:39 2012 +0000
@@ -53,7 +53,9 @@
 </para>
 
 <para>
-Можно включить отладочный лог только для определённых адресов:
+Можно включить отладочный лог только для
+<link doc="ngx_core_module.xml" id="debug_connection">определённых
+клиентских адресов</link>:
 
 <programlisting>
 error_log /path/to/log;
--- a/xml/ru/docs/ngx_core_module.xml	Fri May 11 12:51:02 2012 +0000
+++ b/xml/ru/docs/ngx_core_module.xml	Mon May 14 11:29:39 2012 +0000
@@ -42,6 +42,43 @@
 </directive>
 
 
+<directive name="debug_connection">
+<syntax>
+    <value>адрес</value> |
+    <value>CIDR</value> |
+    <literal>unix:</literal></syntax>
+<default/>
+<context>events</context>
+
+<para>
+Включает отладочный лог для отдельных клиентских соединений.
+Для остальных соединений используется уровень лога, заданный директивой
+<link id="error_log"/>.
+Отлаживаемые соединения задаются IPv4 или IPv6 (1.3.0) адресом или сетью.
+Соединение может быть также задано при помощи имени хоста, в этом случае
+используется первый IPv4-адрес, соответствующий имени.
+Отладочный лог для соединений через UNIX-сокеты (1.3.0) включается параметром
+“<literal>unix:</literal>”.
+<example>
+events {
+    debug_connection 127.0.0.1;
+    debug_connection localhost;
+    debug_connection 192.0.2.0/24;
+    debug_connection ::1;
+    debug_connection 2001:0db8::/32;
+    debug_connection unix:;
+    ...
+}
+</example>
+<note>
+Для работы директивы необходимо сконфигурировать nginx с параметром
+<literal>--with-debug</literal>.
+</note>
+</para>
+
+</directive>
+
+
 <directive name="error_log">
 <syntax>
 <value>файл</value> | <literal>stderr</literal>