Message227460
| Author |
domzippilli |
| Recipients |
domzippilli |
| Date |
2014年09月24日.15:59:17 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1411574358.31.0.567150146561.issue22482@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
In the logging module's config.py, see the _create_formatters(cp) method used by the fileConfig() method. Note that it pulls "format" and "datefmt" and submits these in the formatter constructor:
f = c(fs, dfs)
However, the Formatter constructor has a third argument for formatting style:
def __init__(self, fmt=None, datefmt=None, style='%')
Since the argument is not passed, ConfigParser-format logging configs must use %-style logging format masks. We'd prefer to use curlies.
Note that the code for the dictionary configurator does this correctly:
fmt = config.get('format', None)
dfmt = config.get('datefmt', None)
style = config.get('style', '%')
result = logging.Formatter(fmt, dfmt, style) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年09月24日 15:59:18 | domzippilli | set | recipients:
+ domzippilli |
| 2014年09月24日 15:59:18 | domzippilli | set | messageid: <1411574358.31.0.567150146561.issue22482@psf.upfronthosting.co.za> |
| 2014年09月24日 15:59:18 | domzippilli | link | issue22482 messages |
| 2014年09月24日 15:59:17 | domzippilli | create |
|