-
Notifications
You must be signed in to change notification settings - Fork 11
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
group.start_log() failing if no directory exists. #29
Comments
group.start_log()
failing if no directory exists.
Next release will raise an exception if the log file could not be created ( Additionally, in the event which you're talking about (
To create the directory (or directories), there is a new flag added: For now, So, to get the behavior where your directory will be created for you (if it doesn't exist), you will just change your code from log_file_path = group.start_log('logs') to log_file_path = group.start_log('logs', mkdirs=True) |
I'd probably vote for defaulting mkdirs to true. Is there a use case for someone not wanting to create the directory if it doesn't exist? |
However, the examples are currently being overhauled to use log_file_path = group.start_log('logs', mkdirs=True) everywhere. |
If you run
group.start_log('logs')
to start logging but the directorylogs
doesn't exist, it returnsNone
and fails to start logging. Expected behaviors might be:logs
sub-folders so all the code works out of the boxlogs
directory.The text was updated successfully, but these errors were encountered: