httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Wiedmann" <carsten_st...@gmx.de>
Subject [users@httpd] Re: Logging Options - Extended W3C Log Format?
Date Mon, 15 Oct 2007 07:09:07 GMT
J R M schrieb:

> I've recently had a request from one of our clients to provide their logs 
> in the 'Extended W3C Log Format'.
>
> From poking around google and reading
> http://www.w3.org/TR/WD-logfile.html  the fomat looks awfully strange.
>
> Is it possible to configure Apache in a way to create logfiles in this 
> format without using some sort of external logging system?

That's not really a problem. There is only one question: Which fields did 
your client need in the logfile?

Just use mod_log_config and use the apache format string which is similar to 
the extended log file format field.

For example the apache combined log (without username) in  W3C extended log 
format can defined with:
| LogFormat "%h %{%Y-%m-%d}t %{%H:%M:%S}t %m %U%q %>s %b \"%{Referer}i\" 
\"%{User-Agent}i\"" extended
| CustomLog logs/extended_log extended

Add this header to the logfile (extended_log):
| #Version: 1.0
| #Fields: c-dns date time cs-method cs-uri uri-stem sc-status sc-bytes 
cs(referer) cs(user-agent)


Regards,
Carsten







---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message