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
b6c1aeb4
Commit
b6c1aeb4
authored
Apr 14, 2010
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some text
parent
6c50efe7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
Doc/whatsnew/2.7.rst
Doc/whatsnew/2.7.rst
+22
-1
No files found.
Doc/whatsnew/2.7.rst
View file @
b6c1aeb4
...
...
@@ -331,7 +331,28 @@ standard input or output.
PEP 391: Dictionary-Based Configuration For Logging
====================================================
XXX write this section.
.. not documented in library reference yet.
The :mod:`logging` module is very flexible; an application can define
a tree of logging subsystems, and each logger in this tree can filter
out certain messages, format them differently, and direct messages to
a varying number of handlers.
All this flexibility can require a lot of configuration. You can
write Python statements to create objects and set their properties,
but a complex set-up would require verbose but boring code.
:mod:`logging` also supports a :func:`~logging.config.fileConfig`
function that parses a file, but the file format doesn't support
configuring filters, and it's messier to generate programmatically.
Python 2.7 adds a :func:`~logging.config.dictConfig` function that
uses a dictionary, and there are many ways to produce a dictionary
from different sources. You can construct one with code, of course.
Python's standard library now includes a JSON parser, so you could
parse a file containing JSON, or you could use a YAML parsing library
if one is installed.
XXX describe an example.
Two smaller enhancements to the logging module are:
...
...
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