loguru/tests/exceptions/source/others/catch_as_context_manager.py

11 lines
171 B
Python

import sys
from loguru import logger
logger.remove()
logger.add(sys.stderr, format="", diagnose=False, backtrace=False, colorize=False)
with logger.catch():
1 / 0