Python: Logging exceptions with custom *kwargs

后端 未结 1 1673
天涯浪人
天涯浪人 2021-01-20 02:14

as you might know the python logging module supports the definition of *kwargs to customize log entries. This appears to be not supported for logging exceptions.

My

1条回答
  •  悲哀的现实
    2021-01-20 03:13

    You can just use e.g.

    logger.error('Message with %s', 'args', exc_info=1, extra={...})
    

    0 讨论(0)
提交回复
热议问题