Ulf Hofemeier <[EMAIL PROTECTED]> wrote: > I have to admit that the analog configuration is getting quite > confusing to me. Unfortunately the APACHELOGFORMAT line doesn't solve > my problem, so please allow me to provide you with a little more > information regarding the purpose of the updated analog.cfg, as well > as what I'm doing before the problem occurs. > > 1. Copy the previous month Apache log to a temporary location > 2. Run a script to extract page visitor data from the general Apache > log file and store it in a separate file > 3. Run a bash 'for i' loop on the new log files and store the data in > page visitor sub directores > > Unfortunately I decided that Apache has to write more information to > its access_log log file, which is finally the reason why there is > issues with analog now. According to the analog documentation there is > a way to set up a hierarchy so that it will understand a log file > syntax even if it changes from old to new over time, but I haven't > been able to figure out how to make it work.
If you have multiple LOGFORMAT statements, Analog will try them each in turn until it finds one that matches the entries in each of your logiles. That means that if you have multiple logfiles, and they aren't all the same format, Analog can still create a single report from these different logfiles. Obviously the report may understate this items that weren't recorded in some of the logfiles - for example, you might have a million requests, but only only 200,000 Browser strings if you only added that field in leater log files. LOGFORMAT commands apply to LOGFILEs that are specified after the LOGFORMAT in the .cfg file. DEFAULTLOGFORMAT commands apply to logfiles that are specified on the command line. It's not clear from your description whether your script calls Analog and passes it the name of the logfile as a paramter, or whether Analog picks up the logfile from the LOGFILE log-????-??.gz statement in your .cfg file. If you're speciying the LOGFILES in the .cfg file, then these lines should do the job: APACHELOGFORMAT (%h %l \"%u\" %t \"%r\" %>s %b) APACHELOGFORMAT (%h %l \"%u\" %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\") If you're calling Analog with the logfiles specified on the command line, then these lines should work: DEFAULTAPACHELOGFORMAT (%h %l \"%u\" %t \"%r\" %>s %b) DEFAULTAPACHELOGFORMAT (%h %l \"%u\" %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\") Aengus +------------------------------------------------------------------------ | TO UNSUBSCRIBE from this list: | http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general +------------------------------------------------------------------------