title: Rotate logfiles each time the application is started (Python)
body: <p>I'm using the logging module in Python and I would like it to create a new logfile each time my application is started. The older logfiles shoud be rotated (eg: logfile.txt -> logfile1.txt, etc).</p>
  
  <p>I already found this:</p>
  
  <p><a href="http://docs.python.org/library/logging.html">http://docs.python.org/library/logging.html</a></p>
  
  <blockquote>
    <p>BaseRotatingHandler is the base class
    for handlers that rotate log files at
    a certain point. It is not meant to be
    instantiated directly. Instead, use
    RotatingFileHandler or
    TimedRotatingFileHandler.</p>
  </blockquote>
  
  <p>The RotatingFileHandler does a rollover at a predetermined size and the TimedRotatingFileHandler does a rollover based on the product of when and interval. Both are not what I want, I want the rotation to happen immediately when my application starts.</p>