File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -82,9 +82,20 @@ application environment.
82
82
83
83
There are at least three ways to configure a logger:
84
84
85
- - using a file
86
- - using a dictionary
87
- - using code
85
+ - Using an INI-formatted file:
86
+ - *Pro * -- possible to update configuration while running
87
+ using the function :func: `logging.config.listen ` to listen
88
+ on a socket.
89
+ - *Con * -- less control (*e.g. * custom subclassed filters or loggers)
90
+ than possible when configuring a logger in code.
91
+ - Using a dictionary or a JSON-formatted file:
92
+ - *Pro * -- in addition to updating while running, it is possible to
93
+ load from a file using the :mod: `json ` module, in the standard
94
+ library since Python 2.6.
95
+ - *Con * -- less control than when configuring a logger in code.
96
+ - Using code:
97
+ - *Pro * -- complete control over the configuration.
98
+ - *Con * -- modifications require a change to source code.
88
99
89
100
90
101
Example Configuration via an INI File
You can’t perform that action at this time.
0 commit comments