Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7cf4d9bf
Commit
7cf4d9bf
authored
Sep 26, 2003
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bug #812936] Correct the documentation for RotatingFileHandler.
[2.3 bugfix candidate]
parent
df49324c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
Doc/lib/liblogging.tex
Doc/lib/liblogging.tex
+15
-11
No files found.
Doc/lib/liblogging.tex
View file @
7cf4d9bf
...
@@ -499,19 +499,23 @@ The \class{RotatingFileHandler} class supports rotation of disk log files.
...
@@ -499,19 +499,23 @@ The \class{RotatingFileHandler} class supports rotation of disk log files.
Returns a new instance of the
\class
{
RotatingFileHandler
}
class. The
Returns a new instance of the
\class
{
RotatingFileHandler
}
class. The
specified file is opened and used as the stream for logging. If
specified file is opened and used as the stream for logging. If
\var
{
mode
}
is not specified,
\code
{
'a'
}
is used. By default, the
\var
{
mode
}
is not specified,
\code
{
'a'
}
is used. By default, the
file grows indefinitely. You can use the
\var
{
maxBytes
}
and
file grows indefinitely.
You can use the
\var
{
maxBytes
}
and
\var
{
backupCount
}
values to allow the file to
\dfn
{
rollover
}
at a
\var
{
backupCount
}
values to allow the file to
\dfn
{
rollover
}
at a
predetermined size. When the size is about to be exceeded, the file is
predetermined size. When the size is about to be exceeded, the file is
closed and a new file opened for output, transparently to the
closed and a new file is silently opened for output. Rollover occurs
caller. Rollover occurs whenever the current log file is nearly
whenever the current log file is nearly
\var
{
maxBytes
}
in length; if
\var
{
maxBytes
}
in length. If
\var
{
backupCount
}
is >= 1, the system
\var
{
maxBytes
}
is zero, rollover never occurs. If
\var
{
backupCount
}
will successively create new files with the same pathname as the base
is non-zero, the system will save old log files by appending the
file, but with extensions ".1", ".2" etc. appended to it. For example,
extensions ".1", ".2" etc., to the filename. For example, with
with a backupCount of 5 and a base file name of "app.log", you would
a
\var
{
backupCount
}
of 5 and a base file name of
get "app.log", "app.log.1", "app.log.2", ... through to
\file
{
app.log
}
, you would get
\file
{
app.log
}
,
"app.log.5". When the last file reaches its size limit, the logging
\file
{
app.log.1
}
,
\file
{
app.log.2
}
, up to
\file
{
app.log.5
}
. The file being
reverts to "app.log" which is truncated to zero length. If
written to is always
\file
{
app.log
}
. When this file is filled, it is
\var
{
maxBytes
}
is zero, rollover never occurs.
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.
\end{classdesc}
\end{classdesc}
\begin{methoddesc}
{
doRollover
}{}
\begin{methoddesc}
{
doRollover
}{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment