title: Use fileConfig to configure custom handlers in Python
body: <p>I'm using a config file to configure my logger in a Python application. This is the file:</p>
  
  <pre><code>[loggers]
  keys=root
  
  [logger_root]
  level=INFO
  handlers=console
  
  [handlers]
  keys=console,file_rotating
  
  [handler_console]
  class=StreamHandler
  level=WARNING
  formatter=console
  args=(sys.stderr,)
  
  [handler_file_rotating]
  class=TimeRotatingFileHandler
  level=DEBUG
  formatter=file
  args=('../logs/twicker.log', 'd', 1, 5)
  
  [formatters]
  keys=console,file
  
  [formatter_console]
  format=%(levelname)s - %(message)s
  
  [formatter_file]
  format=%(asctime)s - %(levelname)s - %(module)s - %(message)s
  </code></pre>
  
  <p>My problem is with TimeRotatingFileHandler. Everytime I run the app I get the next error:</p>
  
  <blockquote>
    <p>ImportError: No module named 'TimeRotatingFileHandler'</p>
  </blockquote>
  
  <p>What I'm doing wrong? I tried also changing class line to <code>class=handlers.TimeRotatingFileHandler</code> but in that case I get the next error:</p>
  
  <blockquote>
    <p>ImportError: No module named 'handlers'</p>
  </blockquote>