Mercurial > hg > nginx-site
comparison xml/cn/docs/debugging_log.xml @ 720:9934338f83af
Updated the Chinese documentation.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 11 Oct 2012 10:23:05 +0000 |
parents | 149f54c158f0 |
children |
comparison
equal
deleted
inserted
replaced
719:6a37df6078a1 | 720:9934338f83af |
---|---|
1 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> | 1 <!-- |
2 Copyright (C) Igor Sysoev | |
3 Copyright (C) Nginx, Inc. | |
4 --> | |
5 | |
6 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> | |
2 | 7 |
3 <article name="调试日志" | 8 <article name="调试日志" |
4 link="/cn/docs/debugging_log.html" | 9 link="/cn/docs/debugging_log.html" |
5 lang="cn"> | 10 lang="cn" |
11 rev="1"> | |
6 | 12 |
7 | 13 |
8 <section> | 14 <section> |
9 | 15 |
10 <para> | 16 <para> |
22 | 28 |
23 nginx的windows二进制版本总是将调试日志开启的,因此只需要设置<literal>debug</literal>的日志级别即可。 | 29 nginx的windows二进制版本总是将调试日志开启的,因此只需要设置<literal>debug</literal>的日志级别即可。 |
24 </para> | 30 </para> |
25 | 31 |
26 <para> | 32 <para> |
27 注意,在其他级别定义日志,如在<i>server</i>层次,会关闭该主机的日志: | 33 注意,重新定义错误日志时,如过没有指定<literal>debug</literal>级别,调试日志会被屏蔽。下面的例子里,在<link doc="http/ngx_http_core_module.xml" id="server"/>层中重新定义的日志就屏蔽了这个虚拟主机的调试日志: |
28 <programlisting> | 34 <programlisting> |
29 error_log /path/to/log debug; | 35 error_log /path/to/log debug; |
30 | 36 |
31 http { | 37 http { |
32 server { | 38 server { |
33 error_log /path/to/log; | 39 error_log /path/to/log; |
34 ... | 40 ... |
35 </programlisting> | 41 </programlisting> |
36 应该注释掉这条server日志,或者也增加<literal>debug</literal>标志: | 42 为了避免这个问题,注释这行重新定义日志的配置,或者也给日志指定<literal>debug</literal>级别: |
37 <programlisting> | 43 <programlisting> |
38 error_log /path/to/log debug; | 44 error_log /path/to/log debug; |
39 | 45 |
40 http { | 46 http { |
41 server { | 47 server { |
43 ... | 49 ... |
44 </programlisting> | 50 </programlisting> |
45 </para> | 51 </para> |
46 | 52 |
47 <para> | 53 <para> |
48 另外,也可以只针对某些地址开启调试日志: | 54 另外,也可以只针对<link doc="ngx_core_module.xml" id="debug_connection">选定的客户端地址</link>开启调试日志: |
49 | 55 |
50 <programlisting> | 56 <programlisting> |
51 error_log /path/to/log; | 57 error_log /path/to/log; |
52 | 58 |
53 events { | 59 events { |