The Python Papers

The Python Papers

Python 101 - Creating Rotating Logs

Mike Driscoll's avatar
Mike Driscoll
Aug 17, 2023
∙ Paid

Python’s logging module has lots of options. In this article, you will look at the logging module’s ability to create Rotating Logs.

Python supports two types of rotating logs:

  • Rotate logs based on size (RotatingFileHandler)

  • Rotate the logs based on some time interval (TimedRotatingFileHandler)

Let’s spend some time learning how each of these two types of …

User's avatar

Continue reading this post for free, courtesy of Mike Driscoll.

Or purchase a paid subscription.
© 2026 Mike Driscoll · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture