Skip to content

Commit

Permalink
Merge pull request #5 from NatLee/patch-1
Browse files Browse the repository at this point in the history
[fix] Path for logging
  • Loading branch information
charlie0227 authored Jul 30, 2022
2 parents 8148853 + f9baab8 commit ef1cf7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class Config:
class Logger(Config):
def __init__(self):
path = os.path.join(self.path, self.LOGGING_PATH)
path = "{}/{}".format(path, datetime.datetime.now().strftime("shopee.%Y-%m.log"))
if not os.path.exists(path):
os.makedirs(path)
path = "{}/{}".format(path, datetime.datetime.now().strftime("shopee.%Y-%m.log"))
logging_level = logging.DEBUG if self.DEBUG else logging.INFO
logger = logging.getLogger()
logger.setLevel(logging_level)
Expand Down

0 comments on commit ef1cf7e

Please sign in to comment.