python 重写Logger error方法添加better_exceptions来记录详细日至
1. better_exceptions 包
Pretty and useful exceptions in Python, automatically.
github
eg:
import sys
import logging
import better_exceptions
logger = logging.getLogger(__name__)
try:
a = {1: 1, 2: 2, 3: 34, 4: [1, 2, 3, 45]}
print(a[6])
except Ex
原创
2021-08-03 11:56:54 ·
606 阅读 ·
1 评论