[logback-user] How to format (mask certain strings) when using SyslogAppender

Kumar Pandey kumar_raj at yahoo.com
Thu Jun 19 23:29:59 CEST 2014


All
   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 .

Thanks
Kumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20140619/3e326de6/attachment.html>


More information about the Logback-user mailing list