Python: Logging exceptions with custom *kwargs

后端 未结 1 1671
天涯浪人
天涯浪人 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)
提交回复
热议问题