diff options
| author | Andrew M. Kuchling <amk@amk.ca> | 2010-04-14 14:28:31 (GMT) |
|---|---|---|
| committer | Andrew M. Kuchling <amk@amk.ca> | 2010-04-14 14:28:31 (GMT) |
| commit | b6c1aeb48647423eb893aa0d0bf1a444747ca7fd (patch) | |
| tree | 5430080f98991a8092dbda2c5cef45f4c988c6db | |
| parent | 6c50efe76b8802210718a896ca0ceee421d25487 (diff) | |
| download | cpython-b6c1aeb48647423eb893aa0d0bf1a444747ca7fd.zip cpython-b6c1aeb48647423eb893aa0d0bf1a444747ca7fd.tar.gz cpython-b6c1aeb48647423eb893aa0d0bf1a444747ca7fd.tar.bz2 | |
Add some text
| -rw-r--r-- | Doc/whatsnew/2.7.rst | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst index 0ddeff4..8f02d1c 100644 --- a/Doc/whatsnew/2.7.rst +++ b/Doc/whatsnew/2.7.rst @@ -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: |
