pull/55/head
Kye 1 year ago
parent d2abc16164
commit 29b82b595b

@ -1,9 +1,10 @@
import time import functools
import logging import logging
import threading import threading
import functools import time
import warnings import warnings
def log_decorator(func): def log_decorator(func):
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):
logging.info(f'Entering {func.__name__}') logging.info(f'Entering {func.__name__}')

@ -2,8 +2,11 @@ import logging
logger = logging.getLogger() logger = logging.getLogger()
formatter = logging.Formatter("%(message)s") formatter = logging.Formatter("%(message)s")
ch = logging.StreamHandler() ch = logging.StreamHandler()
ch.setFormatter(formatter) ch.setFormatter(formatter)
logger.addHandler(ch) logger.addHandler(ch)
logger.setLevel(logging.DEBUG) logger.setLevel(logging.DEBUG)

Loading…
Cancel
Save