Skip to content

Commit

Permalink
fix 'No such file or directory'
Browse files Browse the repository at this point in the history
  • Loading branch information
staciax committed Oct 27, 2024
1 parent 98cf1d8 commit 7311933
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lattebot/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def setup_logging(level: int = logging.INFO) -> Generator[None]:

# TODO: dynamically set log directory
directory = Path('logs')
directory.resolve()
if not directory.exists():
directory.mkdir(parents=True, exist_ok=True)

rotating_file_handler = RotatingFileHandler(
filename=directory / 'lattebot.log',
Expand Down

0 comments on commit 7311933

Please sign in to comment.