nginx ドキュメント訳: nginx ハウツー – デバッギングログ

nginxWikipediaの説明)のドキュメント訳の4回目は「nginx howto(nginx ハウツー)」の「A debugging log(デバッギングログ)」です。


デバッギングログ
原文: A debugging log

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

./configure --with-debug ...

次に “error_log” の “debug” レベルをセットします:

error_log  /path/to/log  debug;

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

別のレベル、例えば server レベルでログを定義するとそのサーバでのデバッギングログが無効になりますので注意してください:

error_log  /path/to/log  debug;

http {
    server {
        error_log  /path/to/log;
        ...

このサーバログをコメントアウトするか “debug” フラグを追加してください:

error_log  /path/to/log  debug;

http {
    server {
        error_log  /path/to/log  debug;
        ...

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

error_log  /path/to/log;

events {
    debug_connection   192.168.1.1;
    debug_connection   192.168.10.0/24;
}

文書作成: Igor Sysoev
編集: Brian Mercer
翻訳: DigitalCube Co. Ltd.
監訳:


Nginx のインストール/パフォーマンスチューニングサービス
Link: http://ja.ninjax.cc/


Twitter Comment


This entry was posted in 小ネタ. Bookmark the permalink.