log: Add support for Logging's 'extra' keyword argument

This commit is contained in:
Benjamin Rubin 2014-01-05 17:15:00 -05:00
parent 43e1b55506
commit 1093cfb01f

View File

@ -82,9 +82,10 @@ class Logger(logging.Logger):
# The traceback should be sufficient if we want it.
# self.error('Exception string: %s', eStrId)
def _log(self, level, msg, args, exc_info=None):
def _log(self, level, msg, args, exc_info=None, extra=None):
msg = format(msg, *args)
logging.Logger._log(self, level, msg, (), exc_info=exc_info)
logging.Logger._log(self, level, msg, (), exc_info=exc_info,
extra=extra)
class StdoutStreamHandler(logging.StreamHandler):