On 11/11/2003 9:20 AM, Sean at IMAGINET felt like writing:

For my weekly reports i use the following:-

        FROM -00-00-07
        TO  -00-00-01

But what do you use for LOGFILE? My files are named like ex%y%M%D.log. If I use that, analog will only process the log for ex031110.log (given today's date) because it bases the substitution only on the TO date. So I change LOGFILE to ex%y%M??.log to make sure I cover everything for the month...but then what happens when my week overlaps a month boundary? The only real solution I see is to not limit filenames by date (ex??????.log) and parse every file for dates in the desired range. Ugh.


Or for 'last month':-

        FROM -00-0101
        TO  -00-0131

Which, if I redefine my LOGFILE to ex%y%M??.log for the monthly report, works fine. But I shouldn't ever have to change my LOGFILE directive - my log name format has not changed. Between FROM, TO, and LOGFILE, analog ought to have everything it needs to open all the files it needs but no more than it needs. Again assuming logs rotated out at midnight, of course.


A bit of unnecessary log file opening and closing required but this works well as long as the necessary logs are avialble in the path.

A _lot_ of unnecessary log file processing, and I've only got logs going back a year.


If there's some simple trick I could add to my script I'd be happy, but if the file selection worked as I describe I don't think I'd need a script at all; I could schedule analog directly with a few options on the command line. It's not terribly difficult to do the date calculations and build all the necessary file names myself, but it seems like duplication of effort if every webmaster has to do this. Maybe I will look into hacking analog's source.

Thanks,
Tim
--
Tim Larson, Webmaster                                     LovelySkin.com
402.334.SKIN                          For a more beautiful you, surf us!

+------------------------------------------------------------------------
|  TO UNSUBSCRIBE from this list:
|    http://lists.isite.net/listgate/analog-help/unsubscribe.html
|
|  Digest version: http://lists.isite.net/listgate/analog-help-digest/
|  Usenet version: news://news.gmane.org/gmane.comp.web.analog.general
|  List archives:  http://www.analog.cx/docs/mailing.html#listarchives
+------------------------------------------------------------------------

Reply via email to