]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-134817: Document [Timed]RotatingFileHandler shouldRollover method (GH-134818)
authorAllen Hernandez <AllenSH12@users.noreply.github.com>
Wed, 28 May 2025 06:44:38 +0000 (02:44 -0400)
committerGitHub <noreply@github.com>
Wed, 28 May 2025 06:44:38 +0000 (07:44 +0100)
Co-authored-by: Allen Hernandez <2349718+AllenSH12@users.noreply.github.com>
Doc/library/logging.handlers.rst

index 63ef533e82c658f8892d70e13f1a2c8f42e9c627..8f3aa1dfdd0cde5e11343db6a39d87000a401326 100644 (file)
@@ -352,6 +352,10 @@ module, supports rotation of disk log files.
       Outputs the record to the file, catering for rollover as described
       previously.
 
+   .. method:: shouldRollover(record)
+
+      See if the supplied record would cause the file to exceed the configured size limit.
+
 .. _timed-rotating-file-handler:
 
 TimedRotatingFileHandler
@@ -459,7 +463,11 @@ timed intervals.
    .. method:: getFilesToDelete()
 
       Returns a list of filenames which should be deleted as part of rollover. These
-      are the absolute paths of the oldest backup log files written by the handler.
+
+   .. method:: shouldRollover(record)
+
+      See if enough time has passed for a rollover to occur and if it has, compute
+      the next rollover time.
 
 .. _socket-handler: