title: Can't disable flask/werkzeug logging
body: <p>I have been trying for way to long to disable the logger of werkzeug. I'm trying to create a socketio server in python but werkzeug keeps logging all POST and GET requests. It's really annoying because my logging get's flooded. </p>
  
  <pre><code>async_mode = 'gevent'
  import logging
  
  from flask import Flask, render_template
  import socketio
  
  
  sio = socketio.Server(logger=False, async_mode=async_mode)
  app = Flask(__name__)
  
  
  app.wsgi_app = socketio.Middleware(sio, app.wsgi_app)
  app.config['SECRET_KEY'] = 'secret!'
  thread = None
  
  app.logger.disabled = True
  log = logging.getLogger('werkzeug')
  log.disabled = True
  
  
  @app.route('/')
  def index():
      #global thread
      #if thread is None:
      #    thread = sio.start_background_task(background_thread)
      return render_template('index.html')
  
  
  
  @sio.on('answer', namespace='/test')
  def test_answer(sid, message):
      print(message)
  
  
  if __name__ == '__main__':
      if sio.async_mode == 'threading':
          # deploy with Werkzeug
          app.run(threaded=True)
      elif sio.async_mode == 'eventlet':
          # deploy with eventlet
          import eventlet
          import eventlet.wsgi
          eventlet.wsgi.server(eventlet.listen(('', 5000)), app)
      elif sio.async_mode == 'gevent':
          # deploy with gevent
          from gevent import pywsgi
          try:
              from geventwebsocket.handler import WebSocketHandler
              websocket = True
          except ImportError:
              websocket = False
          if websocket:
              pywsgi.WSGIServer(('', 5000), app,
                                handler_class=WebSocketHandler).serve_forever()
          else:
              pywsgi.WSGIServer(('', 5000), app).serve_forever()
      elif sio.async_mode == 'gevent_uwsgi':
          print('Start the application through the uwsgi server. Example:')
          #print('uwsgi --http :5000 --gevent 1000 --http-websockets --master '
          #      '--wsgi-file app.py --callable app')
      else:
          print('Unknown async_mode: ' + sio.async_mode)
  </code></pre>
  
  <p>Everywhere is see this as the solution but it doesn't stop werkzeug from logging.</p>
  
  <pre><code>app.logger.disabled = True
  log = logging.getLogger('werkzeug')
  log.disabled = True
  </code></pre>
  
  <p>These are the kind of messages:</p>
  
  <pre><code>::1 - - [2018-02-28 22:09:03] "GET /socket.io/?EIO=3&amp;transport=polling&amp;t=M7UFq6u HTTP/1.1" 200 345 0.000344
  ::1 - - [2018-02-28 22:09:03] "POST /socket.io/?EIO=3&amp;transport=polling&amp;t=M7UFq7A&amp;sid=daaf8a43faf848a7b2ae185802e7f164 HTTP/1.1" 200 195 0.000284
  ::1 - - [2018-02-28 22:09:03] "GET /socket.io/?EIO=3&amp;transport=polling&amp;t=M7UFq7B&amp;sid=daaf8a43faf848a7b2ae185802e7f164 HTTP/1.1" 200 198 0.000153
  ::1 - - [2018-02-28 22:10:03] "GET /socket.io/?EIO=3&amp;transport=polling&amp;t=M7UFq7N&amp;sid=daaf8a43faf848a7b2ae185802e7f164 HTTP/1.1" 400 183 60.058020
  </code></pre>
  
  <p>I've tried to set the level to only critical, but that didn't help either. I've also tried to use grep to suppress the messages but it seems that grep doesn't work with python console output.</p>
  
  <p>Edit: I'm using python 3.5.2 on linux but had the same problem on 3.6 on windows. werkzeug is 0.14.1, flaks is 0.12.2 and python-socketio is 1.8.4</p>
  
  <p>Edit2: I was able to fix the problem by using grep, the problem was that werkzeug send everything to stderr which should be handled differently in the command line.</p>
  
  <p><code>python app.py 2&gt;&amp;1 | grep -v 'GET\|POST</code>'</p>
  
  <p>This gives the result I wanted.</p>