[logback-user] How to format (mask certain strings) when using SyslogAppender
kumar_raj at yahoo.com
Thu Jun 19 23:29:59 CEST 2014
I extend ch.qos.logback.classic.PatternLayout and override doLayout() to mask certain things like credit card number using reg-ex.
This works great with FileAppender and ConsoleAppender.
However while configuring SyslogAppender I found out that we can only use suffixPattern to format the content and PatternLayout cannot be specified.
Here is the explanation on Logback site --
Given that the format of a syslog request follows strict rules, you cannot freely specify the layout to be used with SyslogAppender. However, you can use SuffixPattern option instead to influence the contents of the message sent to the syslog daemon.
So what are my options to change the string content before its sent to SyslogAppender ?
I'm on logback version 1.0.3 .
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Logback-user