def __init__(self, title = None, pathfile = None, debug_mode = True, debug_level = 0):
self.path_file = pathfile
self.debug_mode = debug_mode
self.starttime = time.perf_counter()
self.nowtime = time.perf_counter()
self.lastcall = time.perf_counter()
self.debug_level = debug_level
# create file?
# if not isfile(self.path_file):
# with open(self.path_file, 'w') as f:
# f.write("-init log file-")
if title is not None:
today = datetime.datetime.now()
s = title + " program started the " + today.strftime("%d of %b %Y at %H:%M")
self.log("=============================================================\n" +
s +
"\n=============================================================")
评论列表
文章目录