Python Forum

Full Version: no debug messages going into log file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi all,

the below code works

logger = logging.getLogger("Rotating Log")
logger.setLevel(logging.DEBUG)
handler = TimedRotatingFileHandler(filename='password.log', when='S', interval=30, backupCount=5, delay=True)
formatter = logging.Formatter('%(asctime)s:%(levelname)s:%(message)s', datefmt='%Y/%m/%d %H:%M:%S')
handler.setFormatter(formatter)
logger.addHandler(handler)
but none of the debug messages are going in the log file

thanks,
rob