Index: [Article Count Order] [Thread]

Date:  Tue, 10 Apr 2001 14:35:49 +0900
From:  Kazuhiko Sato <kazuhiko.sato@hco.ntt.co.jp>
Subject:  [analog-jp:00534] Re: ログフォーマットの質問です
To:  "analog-jp@jp.analog.cx" <analog-jp@jp.analog.cx>
Message-Id:  <mid-534-analog-jp@jp.analog.cx>
In-Reply-To:  <mid-533-analog-jp@jp.analog.cx>
X-Mail-Count: 00534

佐藤です。
私が組み込んだサーバと似た設定ですね。

私の環境を表示します。

analog.cfgの設定を私のようにしてみてはいかがでしょうか?
試したら動いちゃったので細かく指定しないで使ってます(笑)
↑本当は指定した方がいいのでしょうけれど・・・

ただ、気になるのが、松木さんのおっしゃてる、日付の日本語表示がネックに
なっているのなら無駄ですが。

私の環境

httpd.conf抜粋************

# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" 
combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
CustomLog /usr/local/apache/logs/httpsd_access_log combined

****************ここまで。

analog.cfgの一部抜粋*********

# If you need a LOGFORMAT command it must go here, above the LOGFILE command.
LOGFORMAT combine
LOGFILE /usr/local/apache/logs/httpsd_access_log

***************ここまで

httpsd_access_logの一部抜粋************

hogehoge.co.jp - - [01/Aug/1999:10:31:02 +0900] "GET / HTTP/1.0" 200 1622
hogehoge.co.jp - - [01/Aug/1999:10:31:03 +0900] "GET /apache_pb.gif 
HTTP/1.0" 200 2326

**************ここまで


>にわかサーバー管理者nao です。
>
>******* httpd.conf の中身 **************************************
>
># The following directives define some format nicknames for use with
># a CustomLog directive (see below).
>
>LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" 
>\"%{User-Agent}i\"" combined
>LogFormat "%h %l %u %t \"%r\" %>s %b" common
>LogFormat "%{Referer}i -> %U" referer
>LogFormat "%{User-agent}i" agent
>
># The location of the access logfile (Common Logfile Format).
># If this does not start with /, ServerRoot is prepended to it.
>
>CustomLog /var/log/httpd/access combined
>
>******** ここまで ***********************************************
>
>この設定に対して
>
>LOGFORMAT (%v %s %j %u [%d/ %m/%Y:%h:%n:%j +0900] "%j%w%r%w%j" %c %b"%f""%B")
>
>自分なりに解釈してこのように書いてみたのですが、やはりうまくいきません。
>どうかこの設定にあったANALOGの書式変更箇所のアドバイスをお願いします。
>たびたび申し訳ないですが、よろしくお願いします。

******
佐藤和彦
kazuhiko.sato@hco.ntt.co.jp(会社)
kazus@ai.wakwak.com(自宅)