Another possibly better way to address this problem is through a custom ObjectRenderer.
At 05:09 PM 2/2/2005, OOMS DIRK wrote:
I would put AccountNo, SecretCode, etc in MDC key-value pairs and apply an appropriate PatternLayout that leaves out the MDC fields you don't want to show.
dirk
> -----Original Message----- > From: Tasso The Developer [mailto:[EMAIL PROTECTED] > Sent: woensdag 2 februari 2005 17:03 > To: [email protected] > Subject: Filtering out data while logging. > > > How would I go about masking or removing certain information > so it doesn't > get logged? > > For instance... > > log.info("Received data from partner: AccountNo=12345, Secret > Code=qwerty; > MessageCode=100"); > > So in the log it would look like... > > Received data from partner: Account=12345, Secret Code=******; > MessageCode=100
-- Ceki G�lc�
The complete log4j manual: http://www.qos.ch/log4j/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
