Page 1 of 1

Log file names

Posted: October 30th, 2008, 4:08 am
by SABUser
I am making the assumption that the sab log files that are named .1, .2 through to .5 work as follows:

If we have 5 log backup files already and sab needs to add a new one it deletes the oldest one, renames the other 4 and adds the new one.

For programs like rsync this is problematic as even though it has 4 of the files complete because they are renamed it re-downloads them all again.

A scheme whereby the file names don't change would be far more efficient.

Thanks

Re: Log file names

Posted: October 30th, 2008, 6:42 am
by shypike
This is standard functionality of the Python libraries we use and we have no intention to write our own version.

Just curious: why do you rsync these files?

Re: Log file names

Posted: October 31st, 2008, 4:25 am
by SABUser
Because logs are important. If they weren't there would be no reason to log in the first place :)

Re: Log file names

Posted: October 31st, 2008, 5:47 am
by shypike
To be honest, I'd have to look at Python's logging spec to see how exactly this is implemented.
I'll get back to you about this.

Re: Log file names

Posted: November 1st, 2008, 5:51 am
by SABUser
No rush its hardly a showstopper; just a worthwhile tweak

Re: Log file names

Posted: November 1st, 2008, 8:54 am
by shypike
The files are indeed renamed. This makes sense, because that way you always know what the order is.
So, I think it would not be a good general fix.
Adding code to implement the option you ask goes to far, the audience for it would be just too small.

Possibly we will gzip the non-current log files in the future.
There's also a previous request to name the files x.log instead of log.x, so that extension-based associations work.
Both under consideration for 0.5.0.