title: How to override Gunicorn's logging config to use a custom formatter
body: <p>I would like gunicorn.error to use the following key-value based log format instead of the default defined in <a href="https://github.com/benoitc/gunicorn/blob/master/gunicorn/glogging.py#L48" rel="noreferrer" title="dwa">gunicorn/glogging.py</a>:</p>
  
  <pre><code>'format': 'timestamp=%(asctime)s pid=%(process)d loglevel=%(levelname)s msg=%(message)s'`
  </code></pre>
  
  <p>In my gunicorn config file:</p>
  
  <pre><code>import logging.config
  
  workers = 2
  bind = "127.0.0.1:8000"
  loglevel = 'INFO'
  
  LOGGING = {
      'version': 1,
      'disable_existing_loggers': True,
      'formatters': {
          'key_value': {
              'format': 'timestamp=%(asctime)s pid=%(process)d loglevel=%(levelname)s msg=%(message)s'
          },
      },
      'handlers': {
          'console': {
              'level': 'INFO',
              'class': 'logging.StreamHandler',
              'formatter': 'key_value',
              'stream': 'ext://sys.stdout'
          }
      },
      'loggers': {
          'gunicorn.error': {
              'handlers': ['console'],
              'level': 'INFO',
              'propagate': False,
          },
          'flask.app': {
              'handlers': ['console'],
              'level': 'INFO',
              'propagate': False,
          }
      },
  }
  
  logging.config.dictConfig(LOGGING)
  </code></pre>
  
  <p>Gunicorn logs twice, in my custom format and in the default format:</p>
  
  <pre><code>timestamp=2016-12-11 15:20:49,559 pid=22110 loglevel=INFO msg=Starting gunicorn 19.6.0
  [2016-12-11 15:20:49 +0000] [22110] [INFO] Starting gunicorn 19.6.0
  timestamp=2016-12-11 15:20:49,559 pid=22110 loglevel=INFO msg=Listening at: http://127.0.0.1:8000 (22110)
  [2016-12-11 15:20:49 +0000] [22110] [INFO] Listening at: http://127.0.0.1:8000 (22110)
  timestamp=2016-12-11 15:20:49,559 pid=22110 loglevel=INFO msg=Using worker: sync
  [2016-12-11 15:20:49 +0000] [22110] [INFO] Using worker: sync
  timestamp=2016-12-11 15:20:49,560 pid=22115 loglevel=INFO msg=Booting worker with pid: 22115
  [2016-12-11 15:20:49 +0000] [22115] [INFO] Booting worker with pid: 22115
  timestamp=2016-12-11 15:20:49,595 pid=22115 loglevel=INFO msg=Starting Flask application
  timestamp=2016-12-11 15:20:49,659 pid=22120 loglevel=INFO msg=Booting worker with pid: 22120
  [2016-12-11 15:20:49 +0000] [22120] [INFO] Booting worker with pid: 22120
  timestamp=2016-12-11 15:20:49,693 pid=22120 loglevel=INFO msg=Starting Flask application
  </code></pre>
  
  <p>I used the <a href="http://rhodesmill.org/brandon/2012/logging_tree/" rel="noreferrer">logging_tree</a> library to take a look at the configured loggers and I'm seeing 2 gunicorn loggers emitting to the console:</p>
  
  <pre><code>&lt;--""
     Level WARNING
     |
     o&lt;--"flask"
     |   Level NOTSET so inherits level WARNING
     |   |
     |   o   "flask.app"
     |       Level INFO
     |       Propagate OFF
     |       Handler Stream &lt;open file '&lt;stdout&gt;', mode 'w' at 0x7f86676b1150&gt;
     |         Level INFO
     |         Formatter fmt='timestamp=%(asctime)s pid=%(process)d loglevel=%(levelname)s msg=%(message)s' datefmt=None
     |
     o&lt;--"gunicorn"
         Level NOTSET so inherits level WARNING
         |
         o   "gunicorn.access"
         |   Level INFO
         |   Propagate OFF
         |
         o   "gunicorn.error"
         |   Level INFO
         |   Propagate OFF
         |   Handler Stream &lt;open file '&lt;stdout&gt;', mode 'w' at 0x7f86676b1150&gt;
         |     Level INFO
         |     Formatter fmt='timestamp=%(asctime)s pid=%(process)d loglevel=%(levelname)s msg=%(message)s' datefmt=None
         |   Handler Stream &lt;open file '&lt;stderr&gt;', mode 'w' at 0x7f86676b11e0&gt;
         |     Formatter fmt='%(asctime)s [%(process)d] [%(levelname)s] %(message)s' datefmt='[%Y-%m-%d %H:%M:%S %z]'
         |
         o&lt;--"gunicorn.http"
             Level NOTSET so inherits level WARNING
             |
             o&lt;--"gunicorn.http.wsgi"
                 Level NOTSET so inherits level WARNING
  </code></pre>
  
  <p>Gunicorn's <a href="http://docs.gunicorn.org/en/stable/settings.html#logger-class" rel="noreferrer">docs</a> say it's possible to specify the logger class to use, but I don't know how to do this.</p>