Skip to content

Commit 8e60e6c

Browse files
[3.13] gh-134817: Document [Timed]RotatingFileHandler shouldRollover method (GH-134818) (GH-134824)
(cherry picked from commit 7be5916)
1 parent 7410402 commit 8e60e6c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Doc/library/logging.handlers.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,10 @@ module, supports rotation of disk log files.
352352
Outputs the record to the file, catering for rollover as described
353353
previously.
354354

355+
.. method:: shouldRollover(record)
356+
357+
See if the supplied record would cause the file to exceed the configured size limit.
358+
355359
.. _timed-rotating-file-handler:
356360

357361
TimedRotatingFileHandler
@@ -459,7 +463,11 @@ timed intervals.
459463
.. method:: getFilesToDelete()
460464

461465
Returns a list of filenames which should be deleted as part of rollover. These
462-
are the absolute paths of the oldest backup log files written by the handler.
466+
467+
.. method:: shouldRollover(record)
468+
469+
See if enough time has passed for a rollover to occur and if it has, compute
470+
the next rollover time.
463471

464472
.. _socket-handler:
465473

0 commit comments

Comments
 (0)