Merge pull request #14 from olysonek/log_to_file
Fix logging to file in the current directory
This commit is contained in:
commit
9e99925a9f
1 changed files with 2 additions and 0 deletions
|
|
@ -74,6 +74,8 @@ class TunedLogger(logging.getLoggerClass()):
|
|||
return
|
||||
|
||||
log_directory = os.path.dirname(filename)
|
||||
if log_directory == '':
|
||||
log_directory = '.'
|
||||
if not os.path.exists(log_directory):
|
||||
os.makedirs(log_directory)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue