Skip to content

Commit

Permalink
Made logging level more appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
TaaviE committed Mar 31, 2020
1 parent 61db837 commit 274cf39
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@

getLogger().setLevel(logging.DEBUG)
logger = getLogger()
logger.info("Started with proxyfix")
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1) # Assume one proxy
logger.debug("Started with proxyfix")

# Assume one proxy using provided NGINX config
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1)
basicConfig(level=logging.DEBUG)

if __name__ == "__main__":
if Config.DEBUG:
logger.info("Starting in debug!")
logger.warning("Starting in debug!")
app.run(debug=True, use_evalex=True, host="0.0.0.0", port=5000)
else:
logger.info("Starting in production")
Expand Down

0 comments on commit 274cf39

Please sign in to comment.