[issue18541] LoggerAdapter example is counter-productive

Antoine Pitrou report at bugs.python.org
Wed Jul 24 11:27:48 CEST 2013


New submission from Antoine Pitrou:

The idiomatic way to use a LoggerAdapter is to override the process() method. However, the example in the cookbook (*) is some gobbledegook code overriding __getitem__ and __iter__ on a separate class. It's a pity that users are directed to use an insane and impractical idiom while the sane way is simple and powerful.

(*) http://docs.python.org/2/howto/logging-cookbook.html#context-info

----------
assignee: docs at python
components: Documentation
messages: 193633
nosy: docs at python, pitrou, vinay.sajip
priority: normal
severity: normal
status: open
title: LoggerAdapter example is counter-productive
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18541>
_______________________________________


More information about the Python-bugs-list mailing list