Log file names

Want something added? Ask for it here.
Post Reply
SABUser
Newbie
Newbie
Posts: 24
Joined: April 11th, 2008, 11:04 am

Log file names

Post 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
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Log file names

Post 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?
SABUser
Newbie
Newbie
Posts: 24
Joined: April 11th, 2008, 11:04 am

Re: Log file names

Post by SABUser »

Because logs are important. If they weren't there would be no reason to log in the first place :)
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Log file names

Post 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.
SABUser
Newbie
Newbie
Posts: 24
Joined: April 11th, 2008, 11:04 am

Re: Log file names

Post by SABUser »

No rush its hardly a showstopper; just a worthwhile tweak
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Log file names

Post 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.
Post Reply