Esempio n. 1
0
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)
Esempio n. 2
0
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("")