0

i need to disable the logging in eventlet for a WSGI server, i tried several things i found online, nothing worked

code :

import eventlet
import socketio
import logging


sio= socketio.Server()

app = socketio.WSGIApp(sio, static_files={
    '/': {'content_type': 'text/html', 'filename': '/home/*****/SecChat/index.html'}
})

#<site functionality (i deleted the code here as its not related)>

if __name__ == '__main__':
    eventlet.wsgi.server(eventlet.listen(('', 5000)), app)

1 Answer 1

2

eventlet.wsgi.server() accepts the log parameter. It accepts both a logger object and a writable file-like object. You can try sending the data to /dev/null with:

if __name__ == '__main__':
    eventlet.wsgi.server(eventlet.listen(('', 5000)), app, log=open(os.devnull,"w"))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.