mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 23:00:18 +00:00
Italic pro/con to bold, and '--' to colon after the pro/con
This commit is contained in:
@@ -83,19 +83,19 @@ application environment.
|
|||||||
There are at least three ways to configure a logger:
|
There are at least three ways to configure a logger:
|
||||||
|
|
||||||
- Using an INI-formatted file:
|
- Using an INI-formatted file:
|
||||||
- *Pro* -- possible to update configuration while running
|
- **Pro**: possible to update configuration while running
|
||||||
using the function :func:`logging.config.listen` to listen
|
using the function :func:`logging.config.listen` to listen
|
||||||
on a socket.
|
on a socket.
|
||||||
- *Con* -- less control (*e.g.* custom subclassed filters or loggers)
|
- **Con**: less control (*e.g.* custom subclassed filters or loggers)
|
||||||
than possible when configuring a logger in code.
|
than possible when configuring a logger in code.
|
||||||
- Using a dictionary or a JSON-formatted file:
|
- Using a dictionary or a JSON-formatted file:
|
||||||
- *Pro* -- in addition to updating while running, it is possible to
|
- **Pro**: in addition to updating while running, it is possible to
|
||||||
load from a file using the :mod:`json` module, in the standard
|
load from a file using the :mod:`json` module, in the standard
|
||||||
library since Python 2.6.
|
library since Python 2.6.
|
||||||
- *Con* -- less control than when configuring a logger in code.
|
- **Con**: less control than when configuring a logger in code.
|
||||||
- Using code:
|
- Using code:
|
||||||
- *Pro* -- complete control over the configuration.
|
- **Pro**: complete control over the configuration.
|
||||||
- *Con* -- modifications require a change to source code.
|
- **Con**: modifications require a change to source code.
|
||||||
|
|
||||||
|
|
||||||
Example Configuration via an INI File
|
Example Configuration via an INI File
|
||||||
|
|||||||
Reference in New Issue
Block a user