Kobe Watkins ([EMAIL PROTECTED]):
> I'm having trouble specifying multiple logfiles and logformats. ...
> So, my agent_log looks like:
> MSProxy/2.0
> Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
> Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
> and my referer_log looks like:
> http://www.mtaasuper.com.au/cgi-bin/wwwwais
> http://www.mtaasuper.com.au/maintain/analog/indx.html
> -
> http://www.mtaasuper.com.au/
> access_log is standard common format:
> ...
> At first, I tried setting LOGFILE (in a .cfg file) to:
> LOGFILE /home/logs/access_log.%Y%M.gz
> LOGFORMAT %B
> LOGFILE /home/logs/agent_log.%Y%M.gz
> LOGFORMAT %f
> LOGFILE /home/logs/referer_log.%Y%M.gz
> but then I discovered that %'s aren't accepted in LOGFILE as they are
> for CHARTDIR etc.
[Aside to STEPHEN: Here's a good argument for allowing this. LOGFILE
/home/logs/agent_log.%Y%M*.gz would grab all daily logs for the
current month!]
> I realised that I would have to specify the logfiles on the command
> line, so I tried the command line:
> /home/wwwdev/analog/analog +g/home/wwwdev/analog/config/detail.cfg
> +O/home/htdocs/maintain/stats/200107_detail.html +F010701 +T010731
>
>/home/logs/access_log.200107.gz,/home/logs/referer_log.200107.gz,/home/logs/agent_log.200107.gz
> with the config file:
> LOGFORMAT COMMON
> LOGFORMAT %f
> LOGFORMAT %B
> This didn't work and it complained:
> Warning D: LOGFORMAT in configuration file
> /home/wwwdev/analog/config/detail.cfg with no subsequent LOGFILE
> Warning F: Can't auto-detect format of logfile
> /home/logs/referer_log.200107.gz: ignoring it
> Broken Pipe
> Warning F: Can't auto-detect format of logfile
> /home/logs/agent_log.200107.gz: ignoring it
> Broken Pipe
You need to use DEFAULTLOGFORMAT for logs specified in another config
file (or on the command line
> So I tried to set the LOGFORMAT on the command line also:
> /home/wwwdev/analog/analog +g/home/wwwdev/analog/config/detail.cfg
> +O/home/htdocs/maintain/stats/200107_detail.html +F010701 +T010731
> +C"LOGFORMAT COMMON" +C"LOGFORMAT %f" +C"LOGFORMAT %B"
>
>/home/logs/access_log.200107.gz,/home/logs/referer_log.200107.gz,/home/logs/agent_log.200107.gz
> Still no luck. It mixes up the logfiles, so my referring site report
> looks like the following and I don't get a browser/os report:
> reqs: site
> ----: ----
> 56: http://www.mtaa.com.au/
> 12: http://online.socialchange.net.au/
> 10: mozilla/4.0 (compatible; msie 5.0; windows 98; digext;
> $http://reg02.kidz.net.au/
You may still have the same problem with DEFAULTLOGFORMAT, except that
the last format given will be used for both the referrer and browser
reports.
> ...
> I've tried specifying the logfiles and logformats in different orders,
> but nothing seems to work. Am I doomed to failure? I can generate a
> report over all of the logfiles (e.g. back to April 2000) without any
> problems using:
> LOGFILE /home/logs/access_log*
> LOGFORMAT %B
> LOGFILE /home/logs/agent_log*
> LOGFORMAT %f
> LOGFILE /home/logs/referer_log*
> But, I also need to generate a single report for each month back to
> April 2000. I could manually edit the .cfg file to generate each report
> initially, but seeing as this needs to become a cron job, that's not a
> long term solution.
You could write a script that builds a temporary config file (or even
pipes a config to an analog process, see anlgform.pl for an example).
In the temporary config include just the LOGFORMAT and LOGFILE lines
you need (and leave the rest in your default config). Using the
script, specific exactly what LOGFILEs you want to load for the
period.
--
Jeremy Wadsack
Wadsack-Allen Digital Group
+------------------------------------------------------------------------
| This is the analog-help mailing list. To unsubscribe from this
| mailing list, go to
| http://lists.isite.net/listgate/analog-help/unsubscribe.html
|
| List archives are available at
| http://www.mail-archive.com/[email protected]/
| http://lists.isite.net/listgate/analog-help/archives/
| http://www.tallylist.com/archives/index.cfm/mlist.7
+------------------------------------------------------------------------