Message298883
Currently, using non-legacy formatting in logging message is really cumbersome. I think a new style could be supported much easier using the following:
logger = logging.getLogger(style='{')
logger.misc('User {} logged in', username}
This is both backwards compatible, and does not interfere with 3rd party packages which might use a different logger with different style. You only have to make sure they do not use this logger without knowing about new format, which can be done in various ways (like prefixing the name of the logger, for example).
See https://bugs.python.org/issue14031 for more information, where this has also been proposed but not really commented upon. |
|
Date |
User |
Action |
Args |
2017-07-23 01:29:55 | mitar | set | recipients:
+ mitar |
2017-07-23 01:29:55 | mitar | set | messageid: <1500773395.26.0.78055303667.issue30995@psf.upfronthosting.co.za> |
2017-07-23 01:29:55 | mitar | link | issue30995 messages |
2017-07-23 01:29:54 | mitar | create | |
|