I'm trying to use python's logging class, and encountering an issue where nothing gets written to the log file. According to the python documentation, the general rule is the class won't tell you about a problem while executing:
"The logging package is designed to swallow exceptions which occur while logging in production"
But I'm interested to understand any issues logging is encountering. The doc goes on to mention you can set a module level variable, raiseExceptions to see some more verbosity.
My question is, how do I set that and/or is there a more direct way to go about debugging this sort of issue?
For reference, here is my implementation of logging (python 2.7):
numeric_log_level = getattr(logging, args.loglevel.upper(), None)
if not isinstance(numeric_log_level, int):
raise ValueError('Invalid log level: %s' % args.loglevel)
logging.basicConfig\
(filename=args.logfile, level=numeric_log_level, format="%(asctime)s - [client] - %(levelname)s - %(message)s")