Changing Access Log Format Manually WS 7.0
I am wondering how to change the access log format manually within the configuration files - for instance, I would like to add the "%Req->headers.user-agent%" format.
Any tips? I've tried adding the format addition to the access file directly - but that doesn't work (I get the error message that the access log should be removed before making these changes - so I assume the format must be added elsewhere).
Thank you!
dailysun
[458 byte] By [
dailysun] at [2007-11-26 12:02:24]

# 1
Yes. In server.xml, on the <access-log> element. For example
<access-log>
<file>../logs/access</file>
<format>%Ses->client.ip% - %Req->vars.auth-user% [%SYSDATE%] "%Req->reqpb.clf-request%" %Req->srvhdrs.clf-status% %Req->srvhdrs.content-length% %vsid% </format>
</access-log>
# 2
Great! Thanks! It worked. I modified server.xml with the following:
<access-log>
<file>../logs/access</file>
<format>%Ses->client.ip% - %Req->vars.auth-user% [%SYSDATE%] "%Req->reqpb.clf-request%" %Req->srvhdrs.clf-status% %Req->srvhdrs.content-length% "%Req->headers.referer%" "%Req->headers.user-agent%"</format>
</access-log>
Then I stopped and restarted the Web server (/bin/stopserv, /bin/startserv). The access log now shows the additional data.
Thanks for the reply!