view xml/ja/docs/debugging_log.xml @ 271:4c6d2c614d2c

Cleaned up XML tag mess: - all of <parameter> and <code>, and some of <dirname>, <value>, and <command> were replaced by <literal>; - the rest of <dirname> were replaced by links; - <argument> were replaced by <value>; - <value> is now rendered in HTML in italic; - <literal> and <path> can now contain <value>. Cleaned up terminology mess: - directives take "parameters".
author Ruslan Ermilov <ru@nginx.com>
date Fri, 23 Dec 2011 17:29:59 +0000
parents 7db449e89e92
children
line wrap: on
line source

<!DOCTYPE article SYSTEM "../../../dtd/article.dtd">

<article name="デバッギングログ"
         link="/ja/docs/debugging_log.html"
         lang="ja">

<section>

<para>
デバッギングログを有効にするには、nginx をデバッグオプションを付けて設定する必要があります:

<programlisting>
./configure --with-debug ...
</programlisting>

次に <literal>error_log</literal> の <literal>debug</literal> レベルをセットします:

<programlisting>
error_log  /path/to/log  debug;
</programlisting>

nginx の Windows バイナリバージョンでは常にデバッグログモードがサポートされてビルドされているので、<literal>debug</literal> レベルをセットするだけです。
</para>

<para>
別のレベル、例えば <i>server</i> レベルでログを定義するとそのサーバでのデバッギングログが無効になりますので注意してください:
<programlisting>
error_log  /path/to/log  debug;

http {
    server {
        error_log  /path/to/log;
        ...
</programlisting>
このサーバログをコメントアウトするか <literal>debug</literal> フラグを追加してください:
<programlisting>
error_log  /path/to/log  debug;

http {
    server {
        error_log  /path/to/log  debug;
        ...
</programlisting>
</para>

<para>
また、特定のアドレスだけデバッギングログを有効にすることもできます:

<programlisting>
error_log  /path/to/log;

events {
    debug_connection   192.168.1.1;
    debug_connection   192.168.10.0/24;
}
</programlisting>
</para>

</section>

</article>