I am trying to use RotatingHandler
for our logging purpose in Python. I have kept backup files as 500 which means it will create maximum of 500 files I guess and th
It doesn't print out INFO, DEBUG message into the file somehow.. Any thoughts why it is not working out?
you don't seem to set a loglevel, so the default (warning) is used
from http://docs.python.org/2/library/logging.html :
Note that the root logger is created with level WARNING.
as for your second question, something like this should do the trick (I haven't tested it, just adapted from my config which is using the TimedRotatingFileHandler):
[loggers]
keys=root
[handlers]
keys=logfile
[formatters]
keys=logfileformatter
[logger_root]
level=DEBUG
handlers=logfile
[formatter_logfileformatter]
format=%(asctime)s %(name)-12s: %(levelname)s %(message)s
[handler_logfile]
class=handlers.RotatingFileHandler
level=NOTSET
args=('testing.log','a',2000,100)
formatter=logfileformatter