Created
December 26, 2017 09:36
-
-
Save hamdifourati/adb3f8f8a35af69187320594e08f9d1e to your computer and use it in GitHub Desktop.
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 logging | |
# Use APP_ENV environment variable to determine app environment | |
# Default to `production` | |
APP_ENV = os.getenv('APP_ENV', 'production') | |
logging.basicConfig( | |
level=(logging.ERROR if APP_ENV is 'production' else logging.DEBUG ) | |
) | |
logging.info("This is just a message !") | |
logging.debug("This is a more verbose message !") | |
logging.warn("This is a warning !") | |
logging.error("This is an error !") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment