Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robust log dir path #1312

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
make the path reference in logger more robust
  • Loading branch information
mikekelly committed Apr 14, 2023
commit 475edd3b40c8769b22519083af2106bcbd08e559
3 changes: 2 additions & 1 deletion scripts/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
class Logger(metaclass=Singleton):
def __init__(self):
# create log directory if it doesn't exist
log_dir = os.path.join('..', 'logs')
this_files_dir_path = os.path.dirname(__file__)
log_dir = os.path.join(this_files_dir_path, '../logs')
if not os.path.exists(log_dir):
os.makedirs(log_dir)

Expand Down