Register stdout in gun access log?

When I wrap the Flask application in a gun writing to stdout, it no longer seems to be anywhere (simple print instructions are not displayed). Is there any way to capture stdout in the gun access log or access the access log and write it directly?

+7
flask gunicorn
source share
1 answer

Log Usage: Set Stream to Standard Output

 import logging app.logger.addHandler(logging.StreamHandler(sys.stdout)) app.logger.setLevel(logging.DEBUG) app.logger.debug("Hello World") 
+10
source share

All Articles