[Python-checkins] cpython (3.4): Issue #23305: clarified RotatingFileHandler documentation.
vinay.sajip
python-checkins at python.org
Fri Jan 23 22:20:16 CET 2015
https://hg.python.org/cpython/rev/93888975606b
changeset: 94259:93888975606b
branch: 3.4
parent: 94256:2bc3e839a3a3
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Fri Jan 23 21:19:04 2015 +0000
summary:
Issue #23305: clarified RotatingFileHandler documentation.
files:
Doc/library/logging.handlers.rst | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst
--- a/Doc/library/logging.handlers.rst
+++ b/Doc/library/logging.handlers.rst
@@ -269,15 +269,16 @@
You can use the *maxBytes* and *backupCount* values to allow the file to
:dfn:`rollover` at a predetermined size. When the size is about to be exceeded,
the file is closed and a new file is silently opened for output. Rollover occurs
- whenever the current log file is nearly *maxBytes* in length; if *maxBytes* is
- zero, rollover never occurs. If *backupCount* is non-zero, the system will save
- old log files by appending the extensions '.1', '.2' etc., to the filename. For
- example, with a *backupCount* of 5 and a base file name of :file:`app.log`, you
- would get :file:`app.log`, :file:`app.log.1`, :file:`app.log.2`, up to
- :file:`app.log.5`. The file being written to is always :file:`app.log`. When
- this file is filled, it is closed and renamed to :file:`app.log.1`, and if files
- :file:`app.log.1`, :file:`app.log.2`, etc. exist, then they are renamed to
- :file:`app.log.2`, :file:`app.log.3` etc. respectively.
+ whenever the current log file is nearly *maxBytes* in length; if either of
+ *maxBytes* or *backupCount* is zero, rollover never occurs. If *backupCount*
+ is non-zero, the system will save old log files by appending the extensions
+ '.1', '.2' etc., to the filename. For example, with a *backupCount* of 5 and
+ a base file name of :file:`app.log`, you would get :file:`app.log`,
+ :file:`app.log.1`, :file:`app.log.2`, up to :file:`app.log.5`. The file being
+ written to is always :file:`app.log`. When this file is filled, it is closed
+ and renamed to :file:`app.log.1`, and if files :file:`app.log.1`,
+ :file:`app.log.2`, etc. exist, then they are renamed to :file:`app.log.2`,
+ :file:`app.log.3` etc. respectively.
.. method:: doRollover()
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list