Vinay Sajip added the comment: > The problem with leaving the behavior as is is that currently the > style keyword is effectively useless and grossly misleading to users.
If you are referring to the style keyword in basicConfig, it merely sets the style of the Formatter used. That can certainly be made more explicit in the documentation. There is a danger in assuming that you can associate a style with a LogRecord via a Logger, because there may be cases where a named logger is used by many different libraries (e.g. 'django.request' might be used by a number of Django middleware libraries). It may not be very common practice, but there is nothing preventing it. The approach suggested also conflates the functionality of Formatters and Loggers, which could also be confusing. > Users should not have to rely on the hack linked in the blog I don't see what makes it a hack. Logging has allowed the usage of arbitrary objects (rather than just strings) for messages, from day one, by design, for this type of eventuality (amongst others). > **These newer formatting options are supported, but exploring them > is outside the scope of this tutorial.** I will change this slightly by adding a cookbook recipe (based on the technique outlined in my blog post) and updating the above text to link to the cookbook recipe. I can also provide links from other parts of the documentation, where formatting is discussed, to point to the cookbook entry. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14031> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com