I have a Flask application that runs with Flask-SocketIO
. I recently installed eventlet
in order to improve performance and utilise the web socket protocol.
My HTTP logs started having 2 additional parameters at the end (after the status code):
127.0.0.1 - - [26/Sep/2019 15:27:58] "GET /supported_countries HTTP/1.1" 200 488 0.019999
127.0.0.1 - - [26/Sep/2019 15:27:58] "GET /specializations HTTP/1.1" 200 381 0.003003
In this case it's the numbers 488 0.019999
and 381 0.003003
.
I am assuming it's the size of the response and the time it took to complete the request?
What are they? (and can I configure what request info is logged?)
Here is my application.py
from my_app import create_app, socketio
app = create_app()
if __name__ == '__main__':
socketio.run(app, host=app.config.get('APP_HOST'),
log_output=app.config.get('LOGGING', False))
Again, please note that this was not happening prior to the installaiton of eventlet
. Flask-SocketIO atuomatically detects that I have it installed and selects it (emphasis mine):
The extension automatically detects which asynchronous framework to use based on what is installed. Preference is given to eventlet, followed by gevent. For WebSocket support in gevent, uWSGI is preferred, followed by gevent-websocket. If neither eventlet nor gevent are installed, then the Flask development server is used.
So the Flask dev server does not output these numbers, whilst the eventlet-configured server does.