title: Nothing is written to file when I override `log_message()` in `SimpleHTTPRequestHandler`
body: <p>I have the following code for a webserver. I have a problem that nothing is printed in <code>httpd.log</code>- and I'm clueless why. The file gets created and if I add a <code>print()</code>statement to <code>log_message()</code> it is printed out, but nothing ever is written to the file.</p>
  
  <pre><code>from http.server import HTTPServer
  from http.server import SimpleHTTPRequestHandler
  import logging
  from logging.handlers import RotatingFileHandler
  
  class MyHandler(SimpleHTTPRequestHandler):
      def __init__(self, *args):
          self.logger = logging.getLogger("httpd")
          formatter = logging.Formatter(
          '%(asctime)s - %(name)s - %(levelname)s - %(message)s')
          fh = RotatingFileHandler("httpd.log", mode='wa',
                  maxBytes=1 &lt;&lt; 20, backupCount=2)
          fh.setFormatter(formatter)
          fh.setLevel(logging.INFO)
          self.logger.addHandler(fh)
          self.logger.info("Creating HTTP Request Handler")
          super(SimpleHTTPRequestHandler, self).__init__(*args)
  
      def log_message(self, format, *args):
          self.logger.info("%s - - [%s] %s\n" %
                           (self.address_string(),
                            self.log_date_time_string(),
                            format%args))
  
  def main():
    server = HTTPServer(('', 80), MyHandler)
    server.serve_forever()
  
  if __name__ == '__main__':
    main()
  </code></pre>
  
  <p>This is on Python 3.1.3</p>