logging
logging copied to clipboard
Add a LogRecord property to indicate if a record includes secrets
Feature request to add a property to LogRecord
class to indicate, that the record.message
includes secret data, that should be handled differently / not printed by some listeners to Logger.root.onRecord
.
For example, a login request (with username and password) might be logged completly to the developer console in a debug mode. But it should not be printed to a file in productive mode.
I wonder if this use case could be handled by expandos / extension methods? I'm not sure how common this use case is - whether it's worth putting in as a first class part of this API.