python 错误捕获
pip install loguru
from loguru import logger
logger.debug("That's it, beautiful and simple logging!")
错误捕获
@logger.catch
def my_function(x, y, z):
# An error? It's caught anyway!
return 1 / (x + y + z)
python 错误捕获
pip install loguru
from loguru import logger
logger.debug("That's it, beautiful and simple logging!")
错误捕获
@logger.catch
def my_function(x, y, z):
# An error? It's caught anyway!
return 1 / (x + y + z)