[thelist] Combining Apache Server Logs
Daniel J. Cody
dcody at oracular.com
Fri May 26 12:01:24 2000
Ron -
Try something like:(lets assume you have access.log, referer.log and
agent.log in a directory)
cat *.log > combined.log
or you add them one at a time to eachother:
cat access.log >> referer.log
cat agent.log >> referer.log
That will append access and agent to referer.
Once you've done this, you can set combined logs in your httpd.conf file
by turning on the customlog directive:
CustomLog /usr/local/apache/logs/access_log combined
and then in your <virtual hosts>(or whatever you're using):
CustomLog /home/djc/access.log combined
will make a file called access.log that has all three log
parameters..(if it only has two, look for a line that might have --
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
-- and edit that.)
Shout if you have any more questions..
.djc.
"Ronald W. Dorman" wrote:
>
> We are going to begin using a new site statistics package that utilizes
> a combined log format to analyze information for site access statistical
> reporting. The old package used separate logs for 'common', 'agent' and
> 'referrer' information. We need to get the data from the old (separate)
> logs into the new (combined) log. Does anyone have a script, or know
> where we might find one that will do this task. We are using Red Hat
> Linux 6.1 and Apache Web Server. Thanks.