RotatingFileHandler issue

Max Lynch ihasmax at
Wed Sep 30 23:38:53 CEST 2009

I have a RotatingFileHandler for my logging system.  I have it set to rotate
once the file becomes 5MB in size.  Here is the conf line I have in my
logging config file:

args=('/web/logs/gobuzz_debug.log', 'a', 5242880, 8)

However, my logging folder contains these files:
-rw-r--r-- 1 www-data www-data 566K Sep 30 16:35 gobuzz_debug.log
-rw-r--r-- 1 www-data www-data 4.2M Sep 30 16:35 gobuzz_debug.log.1
-rw-r--r-- 1 www-data www-data 572K Sep 30 16:36 gobuzz_debug.log.2
-rw-r--r-- 1 www-data www-data 558K Sep 30 16:35 gobuzz_debug.log.3
-rw-r--r-- 1 www-data www-data 3.7K Sep 29 20:52 gobuzz_debug.log.4
-rw-r--r-- 1 www-data www-data 3.7K Sep 29 20:52 gobuzz_debug.log.5
-rw-r--r-- 1 www-data www-data 566K Sep 30 16:36 gobuzz_debug.log.6
-rw-r--r-- 1 www-data www-data 1.6M Sep 30 16:36 gobuzz_debug.log.7
-rw-r--r-- 1 www-data www-data  45K Sep 29 20:50 gobuzz_debug.log.8
-rwxrwxrwx 1 www-data www-data 691K Sep 28 09:39 gobuzz_error.log

Clearly, the files are rotating far before they hit 5MB.  The consequence of
such being that I'm losing a lot of log data.  What gives?  Am I doing
something wrong?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list