From: Allen Hernandez Date: Wed, 28 May 2025 06:44:38 +0000 (-0400) Subject: gh-134817: Document [Timed]RotatingFileHandler shouldRollover method (GH-134818) X-Git-Tag: v3.15.0a1~1479 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7be5916f6dc3db95744b5fec945327d82cce0183;p=thirdparty%2FPython%2Fcpython.git gh-134817: Document [Timed]RotatingFileHandler shouldRollover method (GH-134818) Co-authored-by: Allen Hernandez <2349718+AllenSH12@users.noreply.github.com> --- diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst index 63ef533e82c6..8f3aa1dfdd0c 100644 --- a/Doc/library/logging.handlers.rst +++ b/Doc/library/logging.handlers.rst @@ -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: