[New-bugs-announce] [issue28443] Logger methods never use kwargs

Jordan Brennan report at bugs.python.org
Fri Oct 14 11:09:14 EDT 2016


New submission from Jordan Brennan:

The methods on the Logger class e.g. logger.debug all accept **kwargs, these are passed to the _log method but they are never used.

If _log attached them as an attribute to the LogRecord object, it would allow for creation of more powerful Filter objects to be created.

You would then be able to filter log lines based on arbitrary keyword arguments.

I've attached a patch along with tests that I think would be a sensible addition and I think that this shouldn't impact existing users of the module.

----------
components: Argument Clinic
files: loggingkwargs.patch
keywords: patch
messages: 278653
nosy: jb098, larry
priority: normal
severity: normal
status: open
title: Logger methods never use kwargs
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file45092/loggingkwargs.patch

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


More information about the New-bugs-announce mailing list