title: How to access a logger object from other modules in a web application
body: <p>I have my main.py as follows:</p>
  
  <pre><code>import logging
  import os
  import web
  
  def is_test():
    if 'WEBPY_ENV' in os.environ:
      return os.environ['WEBPY_ENV'] == 'test'
  
  app = web.application(router.urls, globals())
  
  logging.basicConfig(filename="log/debug.log", level=logging.INFO)
  global logger
  logger = logging.getLogger("debug")
  
  if (not is_test()) and __name__ == "__main__":
    app.run()
  </code></pre>
  
  <p>Now, here I have defined a variable named <code>logger</code> as global. So, can I access this variable anywhere in my application w/o redefining it? I am using web.py.
  Basically what i need is something like this. I want to initialize the logger once and I should be able to use it anywhere in my whole application. How can i do that?</p>