mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
log: Add support for Logging's 'extra' keyword argument
This commit is contained in:
parent
43e1b55506
commit
1093cfb01f
@ -82,9 +82,10 @@ class Logger(logging.Logger):
|
|||||||
# The traceback should be sufficient if we want it.
|
# The traceback should be sufficient if we want it.
|
||||||
# self.error('Exception string: %s', eStrId)
|
# 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)
|
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):
|
class StdoutStreamHandler(logging.StreamHandler):
|
||||||
|
Loading…
Reference in New Issue
Block a user