baseimage-tutorial-framework/tfw/main/logging.py
2019-08-15 17:13:36 +02:00

13 lines
314 B
Python

from sys import stderr
from os.path import join
from tfw.config import TFWENV
from tfw.logging import Log, Logger, LogFormatter, VerboseLogFormatter
def setup_logger(name):
Logger([
Log(stderr, LogFormatter(20)),
Log(join(TFWENV.LOGS_DIR, name+'.log'), VerboseLogFormatter())
]).start()