[New-bugs-announce] [issue23597] Allow easy display of local variables in log messages?

Nick Coghlan report at bugs.python.org
Fri Mar 6 03:12:46 CET 2015


New submission from Nick Coghlan:

Issue #22936 added support for easily displaying local variables in tracebacks to the unittest and traceback modules.

Would it be worth also making this capability readily available in the logging APIs that display traceback messages?

The main argument against it is that automatically logging local variables in tracebacks is a *really* good way to introduce sensitive information leaks into your log messages. "Safe repr" type objects (which automatically mask sensitive details in __repr__()) can mitigate this, but we don't provide such an object in the standard library (not even for bytes, bytearray or str, which are the typical containers for potentially sensitive data like passwords).

----------
messages: 237319
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Allow easy display of local variables in log messages?
versions: Python 3.5

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


More information about the New-bugs-announce mailing list