]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-134817: Document [Timed]RotatingFileHandler shouldRollover method (GH-13481...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 28 May 2025 12:32:57 +0000 (14:32 +0200)
committerGitHub <noreply@github.com>
Wed, 28 May 2025 12:32:57 +0000 (12:32 +0000)
(cherry picked from commit 7be5916f6dc3db95744b5fec945327d82cce0183)

Doc/library/logging.handlers.rst

index e63c253e123552b297995c35e109f4ca500483ab..1c4085efa867e8a98a69f7956e3ec3e7d26b0fb8 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: