initLogConfig.py

import logging
import os
# from DataCleaning.library.functions.changeDirectory import *
from DataCleaning.library.config.config import LOG_FORMAT, DATE_FORMAT

# initiate configs for log
def initLogConfig(LOG_FORMAT, DATE_FORMAT, naming = "", logFileName = "log.log"):
# development2Log(naming)
os.chdir("D:\\DCG_PRF_Data_Team\\DataCleaning\\log")
logging.basicConfig(filename = logFileName, level = logging.DEBUG, format = LOG_FORMAT, datefmt = DATE_FORMAT)

# logging.basicConfig(filename = 'log.log', level = logging.DEBUG, format = LOG_FORMAT, datefmt = DATE_FORMAT)
# log2Development()
posted @ 2021-10-05 20:28  石棠  阅读(44)  评论(0编辑  收藏  举报