aboutsummaryrefslogtreecommitdiff
path: root/src/bootstrap.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap.py')
-rw-r--r--src/bootstrap.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bootstrap.py b/src/bootstrap.py
index 9358e3d8..f4b4591c 100644
--- a/src/bootstrap.py
+++ b/src/bootstrap.py
@@ -13,9 +13,13 @@ from urllib.parse import urlsplit
def set_logging(log_path, log_level=logging.INFO,
log_format='%(asctime)s %(levelname)s %(message)s'):
formater = logging.Formatter(log_format)
- handler = logging.FileHandler(log_path)
+ if conf.ON_HEROKU:
+ handler = logging.StreamHandler()
+ else:
+ handler = logging.FileHandler(log_path)
handler.setFormatter(formater)
- for logger_name in ('bootstrap', 'web', 'manager', 'runserver', 'classic_crawler'):
+ for logger_name in ('bootstrap', 'web', 'manager', 'runserver',
+ 'classic_crawler'):
logger = logging.getLogger(logger_name)
logger.addHandler(handler)
logger.setLevel(log_level)
bgstack15