How to edit confidential information from log4net?
Some of the exception messages in our application contain credentials / private keys or other sensitive information that should not go into the error log. I would like to filter the content of the registered post before writing it so that known sensitive values and / or patterns can be replaced with [redacted] or some such text value. Several searches did not change anything. Is there a way to do this and apply it in a generic way across all configured applications?
I don't want to filter knowing where all these exceptions might occur and write exception handlers for that purpose. No exceptions are thrown by our code, so "don't" is not an option.
+3
source to share
2 answers