Merge pull request #535 from bnrubin/master

log: Add support for Logging's 'extra' keyword argument
This commit is contained in:
Valentin Lorentz 2014-01-06 07:54:11 -08:00
commit 5694f2499d

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):