Created
January 28, 2013 15:47
-
-
Save doobeh/4656606 to your computer and use it in GitHub Desktop.
Heroku Logging Quickie
This file contains hidden or 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
| handler = logging.StreamHandler(sys.stdout) | |
| handler.setLevel(logging.DEBUG) | |
| handler.setFormatter(logging.Formatter( | |
| '%(asctime)s %(levelname)s: %(message)s ' | |
| '[in %(pathname)s:%(lineno)d]' | |
| )) | |
| app.logger.addHandler(handler) | |
| app.logger.info('Testing Info Level') | |
| app.logger.debug('Testing Debug Level') | |
| app.logger.warning('Testing Warning Level') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment