14 lines
430 B
Python
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)
|