<DIV id=RTEContent>Hi!</DIV> <DIV> </DIV> <DIV>I have the following logging.conf :</DIV> <DIV>[loggers]<BR>keys=root</DIV> <DIV> </DIV> <DIV>[handlers]<BR>keys=roth</DIV> <DIV> </DIV> <DIV>[formatters]<BR>keys=simpleFormatter</DIV> <DIV> </DIV> <DIV>[logger_root]<BR>level=INFO<BR>handlers=roth</DIV> <DIV> </DIV> <DIV>[handler_roth]<BR>class=RotatingFileHandler<BR>level=INFO<BR>formatter=simpleFormatter<BR>args=('adssim.log','w', 200, 4)</DIV> <DIV> </DIV> <DIV>[formatter_simpleFormatter]<BR>format=%(asctime)s - %(message)s<BR>datefmt=</DIV> <DIV> </DIV> <DIV>and sampleLogging.py script:</DIV> <DIV><FONT size=2> <div>import logging</div> <div>import logging.config</div> <div>logging.config.fileConfig("logging.conf")</div> <div>logger = logging.getLogger("root")</div> <div>for i in xrange(0, 5000):</div> <div>logger.debug("debug message %s" % i)</div> <div>logger.info("info message %s" % i)</div> <div>logger.warn("warn message
%s" % i)</div> <div>logger.error("error message %s" % i)</div> <div>logger.critical("critical message %s" % i)</div> <div> </div> <div>for some reason, i keep getting the following error message:</div> <div>C:\adssim1>python sampleLogging.py<BR>Traceback (most recent call last):<BR> File "C:\Python24\lib\logging\config.py", line 157, in fileConfig<BR> log.addHandler(handlers[hand])<BR>KeyError: 'roth'<BR>No handlers could be found for logger "root"</div> <div> </div> <div>when i did a help(logging) on the logging module, i don't see RotatingFileHandler.</div> <div>Could somebody please help? Thanks!</div></FONT></DIV><p>
<hr size=1> <BR>
What are the most popular cars? Find out at <a href="http://us.rd.yahoo.com/evt=38382/_ylc=X3oDMTEzNWFva2Y2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDMmF1dG9z/*http://autos.yahoo.com/newcars/popular/thisweek.html
">Yahoo! Autos</a>