file_handler = StreamHandler()
app.logger.setLevel(logging.DEBUG)
app.logger.addHandler(file_handler)

@app.route('/')
def hello():
    app.logger.debug('A value for debugging')
app.logger.warning('A value for warning')
return 'Hello World!'
Flask logging with Foreman