config log date
This commit is contained in:
+3
-2
@@ -1,11 +1,12 @@
|
|||||||
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import definitions
|
import definitions
|
||||||
|
|
||||||
|
|
||||||
def init_logger():
|
def init_logger():
|
||||||
logging.basicConfig(filename=definitions.ROOT_DIR + "/appointment.log",
|
logging.basicConfig(filename=definitions.ROOT_DIR + "/appointment_{}.log".format(str(datetime.date.today())),
|
||||||
filemode='a',
|
filemode='a',
|
||||||
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
|
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
|
||||||
datefmt='%D:%H:%M:%S',
|
datefmt='%Y-%m-%d %H:%M:%S',
|
||||||
level=logging.INFO)
|
level=logging.INFO)
|
||||||
|
|||||||
Reference in New Issue
Block a user