log: pass in all kwargs to logging.Logger._log

This include kwargs like stacklevel and stack_info that were more recently added.
This commit is contained in:
James Lu 2023-08-12 15:36:18 -07:00
parent 83d301c604
commit 5f0874b075

View File

@ -86,10 +86,9 @@ 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, extra=None):
def _log(self, level, msg, args, **kwargs):
msg = format(msg, *args)
logging.Logger._log(self, level, msg, (), exc_info=exc_info,
extra=extra)
logging.Logger._log(self, level, msg, (), **kwargs)
class StdoutStreamHandler(logging.StreamHandler):