Forum Moderators: DixonJones

Message Too Old, No Replies

Convert common log --> combined log

in apache

         

atreillou

1:21 pm on Feb 11, 2004 (gmt 0)

10+ Year Member



Hello,

i need a script to convert "common" log to "combined" log from apache.

I need it to use old log with awstats.

Thank you.

larryn

4:32 pm on Feb 11, 2004 (gmt 0)

10+ Year Member



atreillou,

Combined log format is an extension of the common log format. It appends onto the common format the Referer and User-Agent (beware 'Referer' is spelled incorrectly in the specification). Unless you have captured that data in your log, there is no way to 'add' it. Some Apache servers are configured to capture referrer and user-agent information in seperate files -- but these formats traditionally don't include information that could be used to cross-tab the logs together.

If you have access to your server conf file, you can specify the log format via the "CustomLog" directive -- for example "CustomLog /log/combined.log combined" will give you the combined format that is defined via a "LogFormat" directive that is included in the standard Apache conf file.

For complete information on the LogFormat options, I suggest going to the source at [httpd.apache.org ].

Larry

atreillou

8:14 am on Feb 12, 2004 (gmt 0)

10+ Year Member



thanks for the answer

(sorry for my english...)

i know how to custom my log but when i started my apache server i used webalizer to analyse the log. Now i want to use awstats that use combined log.

All work perfectly but i want to analyse my old log and my new log at same time so i need to convert my old log to combined (with user agent and co free)