@@ -499,19 +499,23 @@ \subsubsection{RotatingFileHandler}
499499Returns a new instance of the \class {RotatingFileHandler} class. The
500500specified file is opened and used as the stream for logging. If
501501\var {mode} is not specified, \code {'a'} is used. By default, the
502- file grows indefinitely. You can use the \var {maxBytes} and
502+ file grows indefinitely.
503+
504+ You can use the \var {maxBytes} and
503505\var {backupCount} values to allow the file to \dfn {rollover} at a
504506predetermined size. When the size is about to be exceeded, the file is
505- closed and a new file opened for output, transparently to the
506- caller. Rollover occurs whenever the current log file is nearly
507- \var {maxBytes} in length. If \var {backupCount} is >= 1, the system
508- will successively create new files with the same pathname as the base
509- file, but with extensions ".1" , ".2" etc. appended to it. For example,
510- with a backupCount of 5 and a base file name of "app.log" , you would
511- get "app.log" , "app.log.1" , "app.log.2" , ... through to
512- "app.log.5" . When the last file reaches its size limit, the logging
513- reverts to "app.log" which is truncated to zero length. If
514- \var {maxBytes} is zero, rollover never occurs.
507+ closed and a new file is silently opened for output. Rollover occurs
508+ whenever the current log file is nearly \var {maxBytes} in length; if
509+ \var {maxBytes} is zero, rollover never occurs. If \var {backupCount}
510+ is non-zero, the system will save old log files by appending the
511+ extensions ".1" , ".2" etc., to the filename. For example, with
512+ a \var {backupCount} of 5 and a base file name of
513+ \file {app.log}, you would get \file {app.log},
514+ \file {app.log.1}, \file {app.log.2}, up to \file {app.log.5}. The file being
515+ written to is always \file {app.log}. When this file is filled, it is
516+ closed and renamed to \file {app.log.1}, and if files \file {app.log.1},
517+ \file {app.log.2}, etc. exist, then they are renamed to \file {app.log.2},
518+ \file {app.log.3} etc. respectively.
515519\end {classdesc }
516520
517521\begin {methoddesc }{doRollover}{}
0 commit comments