. : http://www.arcetri.astro.it/manual/ja/mod/mod_log_config.html
: Mon Jan 21 19:44:30 2013
: Fri Feb 28 08:04:38 2014
: IBM-866

:
mod_log_config - Apache HTTP ²î
<-
Apache > HTTP ²î > Áî§Á > î¦Á 2.2 > ¦î

Apache ¦î mod_log_config

í ۇ֐ˑ
:²îµÁ
µîƒµ:Base
¦î:log_config_module
­îµ:mod_log_config.c

¦îÁµí µƒ¡íۦۦۇ ۦµ ɵۦۦ 

¦î:  TransferLog, ֐ۦ LogFormat,  ۦ CustomLog µՐ TransferLog CustomLog Ր

top

µƒۦ

LogFormat CustomLog ۦՐ µ  ۦԵƒ C ȴ "\n" "\t" ǡµ§ µ§µ‘î

µɵ "%" ۦۦ "%"  :

î
%% î¨Áϧ
%a î IP µ
%A î IP µ
%B µÁµՐHTTP
%b µÁµՐHTTP CLF ۦ 1 0 '-'
%{Foobar}C ²îµî Foobar
%D µ
%{FOOBAR}e ҐՐ FOOBAR
%f
%h îµ
%H µ
%{Foobar}i ²îµ Foobar:
%l (identd ) î mod_ident ²î IdentityCheck On -
%m µ­
%{Foobar}n ¦î Foobar
%{Foobar}o Foobar:
%p µɑ²îî
%P µɑ¨µ¨µ ID
%{format}P µɑî ID µ ID format ʵ pid, tid, hextid hextid APR 1.2.0
%q ( ? )
%r µ
%s µîƒµµ µµîƒµ --- µîƒµ %>s
%t µȨ CLF Ȩۦ (ˑۦ)
%{format}t format ۦȨformat strftime (3) ۦ(ܐí)
%T µɑ
%u îî´ (µîƒµ (%s) 401 сí)
%U µ URL µ
%v µɑ²î ServerName
%V UseCanonicalName ²î
%X µîƒµ:
X = Ր
+ = í
- =

( Apache 1.3 î¦Á %c ɒ ϒ ssl %{var}c )

%I µՐ 0 mod_logio
%O Ր0 mod_logio

ɵ "%" ۇ HTTP µîƒµîÁ̡ ȴ "%400,501{User-agent}i" 400 500 î User-agent  µîƒµî "-" µîƒµîµ "!" : "%!200,304,302{Referer}i" 3 îµ Referer 

"<" ">" µ µµ % %s, %U, %T, %D, %r µµ µµîƒµ̒ %>s ­îµ µµî´̒ %<u

µ

¨ԑ 2.0.46 %r, %i, %o ͐íɵ\xhh µ‘îhh 16 µ§µ‘î " \ C ٭ (\n, \t ) 2.0.46 î¦Áµ‘î ɑ

httpd 2.0 1.3 Ր%b %B îÁՐ HTTP µÁµՐ (Ր §ÁSSL LJ) mod_logio %O îîԑՐ ̒

î:

Common Log Format (CLF)
"%h %l %u %t \"%r\" %>s %b"
îµ Common Log Format
"%v %h %l %u %t \"%r\" %>s %b"
NCSA extended/combined ۦ
"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
Referer ۦ
"%{Referer}i -> %U"
Agent (´) ۦ
"%{User-agent}i"
top

¨

²îî´ ۦí¨١ԑ¨

top

BufferedLogs

:µۦǡÁ
:BufferedLogs On|Off
:BufferedLogs Off
Áµ:²î
µîƒµ:Base
¦î:mod_log_config
:2.0.41

BufferedLogs mod_log_config Րۦǡµ ۦǡ µۦǡ µ¨µʵ îÁµ§µ ²î; îµ

top

CookieLog

:ÁÁ
:CookieLog filename
Áµ:²î, îµ
µîƒµ:Base
¦î:mod_log_config
:

CookieLog îÁ filename ServerRoot ۦµ mod_cookies

top

CustomLog

:ۦ
:CustomLog file|pipe format|nickname [env=[!]environment-variable]
Áµ:²î, îµ
µîƒµ:Base
¦î:mod_log_config

CustomLog ²îµ ۦ ҐՐÁ

ۦՐ :

file
ServerRoot ۦµ
pipe
"|"  µ

¨

 httpd î´²î root root 

Unix îµ îµ§ µ§ µ§ ֵ

Րۦ LogFormat nickname ۦ format

ʵ:

# CustomLog with format nickname
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog logs/access_log common

# CustomLog with explicit format string
CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b"

Րí²îҐՐ µȴ ҐՐµ ('env=!name' )µ

ҐՐ mod_setenvif ¦î mod_rewrite ¦îֵ ֵµ ²î GIF Ԩµ ̒Á̒ :

SetEnvIf Request_URI \.gif$ gif-image
CustomLog gif-requests.log common env=gif-image
CustomLog nongif-requests.log common env=!gif-image

RefererIgnore :

SetEnvIf Referer example\.com localreferer
CustomLog referer.log referer env=!localreferer

top

LogFormat

:ۦ
:LogFormat format|nickname [nickname]
:LogFormat "%h %l %u %t \"%r\" %>s %b"
Áµ:²î, îµ
µîƒµ:Base
¦î:mod_log_config

¨µۦ

LogFormat Ր TransferLog ۦՐ µƒۦ format LogFormat ۦ nickname

LogFormat format nickname îۦ nickname LogFormat CustomLog Nickname LogFormat -- î ۦ TransferLog ߃ LogFormat nickname nickname Nickname î¨Áϧ (%)

LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common

top

TransferLog

:
:TransferLog file|pipe
Áµ:²î, îµ
µîƒµ:Base
¦î:mod_log_config

ۦۇ ÁCustomLog Րʵ ۇۦۦ î LogFormat ۦ Common Log Format

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
TransferLog logs/access_log

:  en  |  ja  |  ko  |  tr 

top

Á

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.