diff options
Diffstat (limited to 'src/bootstrap.py')
-rw-r--r-- | src/bootstrap.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bootstrap.py b/src/bootstrap.py index f9de381a..5af29c69 100644 --- a/src/bootstrap.py +++ b/src/bootstrap.py @@ -18,6 +18,10 @@ def set_logging(log_path=None, log_level=logging.INFO, modules=(), if conf.ON_HEROKU: log_format = '%(levelname)s %(message)s' if log_path: + if not os.path.exists(os.path.dirname(log_path)): + os.makedirs(os.path.dirname(log_path)) + if not os.path.exists(log_path): + open(log_path, 'w').close() handler = logging.FileHandler(log_path) else: handler = logging.StreamHandler() |