使用 python 标准日志模块,可以使用以下方法添加原始日志调用的行号: %(lineno)s.
%(lineno)s.
这如何使用 structlog 来完成?
structlog
structlog ×1