def test(*, backtrace, colorize, diagnose): logger.remove() logger.add(sys.stderr, format="", colorize=colorize, backtrace=backtrace, diagnose=diagnose) @logger.catch def callback(): divide(1, 0) callme(callback)
def test(*, backtrace, colorize, diagnose): logger.remove() logger.add(sys.stderr, format="", colorize=colorize, backtrace=backtrace, diagnose=diagnose) def callback(): divide(1, 0) try: callme(callback) except ZeroDivisionError: logger.exception("")