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
e7dbebba
Commit
e7dbebba
authored
Jun 04, 2009
by
Eric Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor documentation fixes for logging.
parent
5000b3b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Doc/library/logging.rst
Doc/library/logging.rst
+2
-2
No files found.
Doc/library/logging.rst
View file @
e7dbebba
...
...
@@ -69,7 +69,7 @@ message::
DEBUG:root:This message should go to the log file
If you run the script repeatedly, the additional log messages are appended to
the file. To create a new file each time, you can pass a
filemode
argument to
the file. To create a new file each time, you can pass a
*filemode*
argument to
:func:`basicConfig` with a value of ``'
w
'``. Rather than managing the file size
yourself, though, it is simpler to use a :class:`RotatingFileHandler`::
...
...
@@ -112,7 +112,7 @@ application::
The most current file is always :file:`/tmp/logging_rotatingfile_example.out`,
and each time it reaches the size limit it is renamed with the suffix
``.1``. Each of the existing backup files is renamed to increment the suffix
(``.1`` becomes ``.2``, etc.) and the ``.
5
`` file is erased.
(``.1`` becomes ``.2``, etc.) and the ``.
6
`` file is erased.
Obviously this example sets the log length much much too small as an extreme
example. You would want to set *maxBytes* to an appropriate value.
...
...
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