Also send bionicbb logs to a file.

Change-Id: If9a6fdbe004e3b4bb7d868b7255f83c232759f80
This commit is contained in:
Dan Albert
2015-04-17 17:51:39 -07:00
parent d3fe4f1229
commit 21988a3b16

View File

@@ -120,6 +120,10 @@ def drop_rejection():
if __name__ == "__main__": if __name__ == "__main__":
logging.basicConfig(level=logging.INFO) logging.basicConfig(level=logging.INFO)
logger = logging.getLogger()
fh = logging.FileHandler('bionicbb.log')
fh.setLevel(logging.INFO)
logger.addHandler(fh)
# Prevent the job from being rescheduled by the reloader. # Prevent the job from being rescheduled by the reloader.
if os.environ.get('WERKZEUG_RUN_MAIN') == 'true': if os.environ.get('WERKZEUG_RUN_MAIN') == 'true':