Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7515384

Browse files
authoredMay 28, 2025··
[3.14] gh-134817: Document [Timed]RotatingFileHandler shouldRollover method (GH-134818) (GH-134823)
(cherry picked from commit 7be5916)
1 parent 998cedb commit 7515384

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)
Please sign in to comment.

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant