title: Logging in Django and gunicorn
body: <p>I'm running django application with gunicorn, and I can't see any log messages I'm wriging.</p>
  
  <p>Here is the code that writes the logs:</p>
  
  <pre><code>logger = logging.getLogger(__name__)
  
  def home_page(request):
      logger.warning('in home page')
  </code></pre>
  
  <p>(note: this code definitely runs, since this is a view that leads to the homepage)</p>
  
  <p>This is my logs configuration from settings.py:</p>
  
  <pre><code>LOGGING = {
      'version': 1,
      'disable_existing_loggers': False,
      'handlers': {
          'console': {
              'level': 'DEBUG',
              'class': 'logging.StreamHandler',
              'stream': sys.stdout,
          },
      },
      'loggers': {
          'django': {
              'handlers': ['console'],
          },
      },
      'root': {'level': 'INFO'},
  }
  </code></pre>
  
  <p>I run gunicorn as daemon with the following arguments:</p>
  
  <pre><code>--access-logfile ../access.log --error-logfile --log-level debug ../error.log
  </code></pre>
  
  <p>Both access.log and error.log are created and filled with gunicorn messages, but I can't see the messages I write.</p>
  
  <p>Thanks</p>