-
-
Save Nilpo/f167c4b2124995b3f92a536bada71870 to your computer and use it in GitHub Desktop.
logging on heroku with flask
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import logging | |
from flask import Flask | |
app = Flask(__name__) | |
if 'DYNO' in os.environ: | |
app.logger.addHandler(logging.StreamHandler(sys.stdout)) | |
app.logger.setLevel(logging.ERROR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment