问题描述:

My goal is to pass messages from logback to syslog. I have categorized log messages and need to forward specific category to syslog.

Category name which needs to be passed to syslog is SERVICE_DOWN

I have found solution how to configure a syslog appender for logback:

<appender name="SYSLOG" class="ch.qos.logback.classic.net.SyslogAppender">

<syslogHost>localhost</syslogHost>

<facility>USER</facility>

<suffixPattern>[%thread] %logger %msg</suffixPattern>

</appender>

<root level="INFO">

<appender-ref ref="SYSLOG"/>

<!-- other appenders as already present -->

</root>

So I need to adjust filter to this appender which will filter my category

相关阅读:
Top