Commit 8f8308b3 by user

Hotfix

parent 317c011a
...@@ -7,8 +7,9 @@ import sys ...@@ -7,8 +7,9 @@ import sys
class Log: class Log:
def __init__(self): def __init__(self):
self.start_log_time = time.localtime(time.time()) self.start_log_time = time.localtime(time.time())
self.logfile = "{}/{}_{}_{}_main.log".format(os.path.dirname(sys.argv[0]) , self.start_log_time.tm_mday, self.start_log_time.tm_mon, self.logfile = "{}/{}_{}_{}_main.log".format(os.getcwd() , self.start_log_time.tm_mday, self.start_log_time.tm_mon,
self.start_log_time.tm_year) self.start_log_time.tm_year)
self.log = logging.getLogger("my_log") self.log = logging.getLogger("my_log")
self.log.setLevel(logging.INFO) self.log.setLevel(logging.INFO)
self.FH = logging.FileHandler(self.logfile, encoding='utf-8') self.FH = logging.FileHandler(self.logfile, encoding='utf-8')
...@@ -52,7 +53,7 @@ class Log: ...@@ -52,7 +53,7 @@ class Log:
log = Log() log = Log()
log.info("\n---- LOG START ---\n{}\n------------------".format(log.logfile))
# A = [i for i in range(5)] # A = [i for i in range(5)]
# log.info("start program") # log.info("start program")
# try: # try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment