Skip to content

Commit

Permalink
fixed cache issue
Browse files Browse the repository at this point in the history
  • Loading branch information
korewaChino committed Jun 8, 2022
1 parent 9c1a596 commit 850c5b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions umpkg/log.py
Expand Up @@ -37,6 +37,9 @@ def format(self, record: logging.LogRecord):
)
chdl = logging.StreamHandler(sys.stdout)
chdl.setFormatter(cfmt)
# if ~/.cache doesnt exist, create it
if not os.path.exists(os.path.expanduser("~/.cache")):
os.makedirs(os.path.expanduser("~/.cache"))
fhdl = logging.FileHandler(os.path.expanduser("~/.cache/umpkg.log"), "a", "utf-8")
fhdl.setFormatter(ffmt)

Expand Down

0 comments on commit 850c5b4

Please sign in to comment.