On Wednesday 12 November 2003 10:40 am, Jeremy Wadsack wrote: > Tim Larson <[EMAIL PROTECTED]> (Wednesday, November 12, 2003 6:58 AM): > > On 11/12/2003 3:12 AM, Stephen Turner felt like writing: > >> On Tue, 11 Nov 2003, Tim Larson wrote: > >>>That's what I'm doing now. Not hard, just tedious. And seemingly > >>>unnecessary since I supply the from and to dates, a log name format, and > >>>we happen to have a calendar system with consistent rules. It feels > >>> like I'm giving someone a map and instructions to drive from here to > >>> Chicago, but still having to specify right|left|straight for every > >>> intersection along the way. > >> > >> Yes, but the problem is, you use one logfile naming convention, but > >> other people use other conventions. Imagine if you only rotated your > >> logfiles weekly, for example -- the rules would be different. The only > >> alternative would be for you to specify in the config file the date > >> range covered by each logfile, which would be just as tedious. > > > > OK, I see that if you name based on week (200301.log - 200353.log; or > > w031101.log, w031108.log, etc) or some other convention, then the from/to > > used for reporting span would not work. Maybe there'd have to be a > > second set of from/to to capture the right logs, then use the existing > > from/to to process records within those logs. But if you're using > > date-based naming at all, there's got to be something better than simple > > wildcarding. > > Well, there is something better than simple wildcarding: %Y, %M, %d. > But I think you are already using that. > > The problem is more than just different date names. One of the most > prevalent log rotation tools out there just names the logs > access.log.1.gz, access.log.2.gz, access.log.3.gz, etc. Even worse, it > "rotates" the numbers each period so what was access.log.1.gz last > week becomes access.log.2.gz.
It gets better: we're using Apache with CustomLog "| /usr/apache/bin/rotatelogs access_log.%V.%Y 604800" That rotates weekly. Turns out, it's a bit difficult to get rotatelogs to start new log precisely at 00:00 on Monday (or whenever's your 1st day of week) -- so when you're generating weekly reports, you have to look at previous week's log as well as the current one. The mapping between FROM/TO period and log filename is not necessarily one-to-one. Dima +------------------------------------------------------------------------ | 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 +------------------------------------------------------------------------
