logging icon indicating copy to clipboard operation
logging copied to clipboard

Add a LogRecord property to indicate if a record includes secrets

Open khainke opened this issue 3 years ago • 1 comments

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.

khainke avatar Feb 10 '22 00:02 khainke

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.

devoncarew avatar Dec 06 '22 19:12 devoncarew