[Python-Dev] logging doc broken (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Mon Dec 13 11:21:18 CET 2010
- Previous message: [Python-Dev] logging doc broken
- Next message: [Python-Dev] logging doc broken
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, Dec 11, 2010 at 6:20 AM, K. Richard Pixley <rich at noir.com> wrote:
I'm not sure where to report this but the online doc appears to be mismatched to python-2.6.5 for the logging module.
Specifically, for a dir of an instance of a LogRecord, I'm seeing: ['doc', 'init', 'module', 'str', 'args', 'created', 'excinfo', 'exctext', 'filename', 'funcName', 'getMessage', 'levelname', 'levelno', 'lineno', 'module', 'msecs', 'msg', 'name', 'pathname', 'process', 'processName', 'relativeCreated', 'thread', 'threadName'] while the documentation lists a different set of attributes including "lvl".
As discussed on this list recently, the logging documentation can unfortunately give the impression that the attributes of the log record are the same as the arguments to the log record constructor. This is not the case - the actual list of attributes can be found in the table showing the useful LogRecord attributes that are available to formatters (and filters) when processing records: http://docs.python.org/library/logging#formatter-objects
Vinay is currently working on updates to the logging documentation, and this is one of the things that is likely to change (with the table of attributes moved to the LogRecord section and referenced from the sections on Formatter and Filter objects).
Regards, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] logging doc broken
- Next message: [Python-Dev] logging doc broken
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]