diff --git a/image_prediction/__init__.py b/image_prediction/__init__.py index e69de29..315dcb1 100644 --- a/image_prediction/__init__.py +++ b/image_prediction/__init__.py @@ -0,0 +1,13 @@ +import logging +import sys + +# log config +LOG_FORMAT = "%(asctime)s [%(levelname)s] - [%(filename)s -> %(funcName)s() -> %(lineno)s] : %(message)s" +DATE_FORMAT = "%Y-%m-%d %H:%M:%S" +stream_handler = logging.StreamHandler(sys.stdout) +stream_handler_format = logging.Formatter(LOG_FORMAT, datefmt=DATE_FORMAT) +stream_handler.setFormatter(stream_handler_format) + +logger = logging.getLogger(__name__) +logger.propagate = False +logger.addHandler(stream_handler)