Files
appointment_request/utils/AppLogging.py
T
2024-03-20 14:18:38 +01:00

14 lines
430 B
Python

import datetime
import logging
from pathlib import Path
LOGS_DIR = str(Path.home())
def init_logger():
logging.basicConfig(filename=LOGS_DIR + "/request_{}.log".format(str(datetime.date.today())),
filemode='a',
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S',
level=logging.INFO)