title: Logging Apache instance name in Django logger
body: <p>We use the Django logging module for our Django app, which runs on a couple of Apache instances on a server; each instance is a different setup, like production/staging/development/testing. How do I log the Apache instance name in the logger? Currently, I've tried this, and it only logs the machine name.</p>
  
  <pre><code>try:
      HOSTNAME = socket.gethostname()
  except:
      HOSTNAME = 'localhost'
  
  LOGGING = {
      'formatters': {
                    'standard': {
                                'format': '%(asctime)s [' + HOSTNAME + '] [%(levelname)s]:[%(lineno)s] - %(message)s'
                                 },
      }
  }
  </code></pre>
  
  <p>How do I identify the Apache instance here?</p>