OK, now I understand.

The SyslogAppender is really just a SocketAppender with either the SyslogLayout 
or RFC5424Layout hardwired.  We’ve discussed allowing patterns in the message 
but never did it because some of the patterns available in the PatternLayout 
shouldn’t be available. But lately I have been adding the ability to specify 
patterns for other layouts and it should be done for this as well. For example, 
I just modified the GelfLayout to do that.  If you wouldn’t mid creating a Jira 
issue I will see if I can get it in the next release.

Ralph

> On Mar 25, 2021, at 11:38 AM, Subhajit Das <subhajitdas...@live.com> wrote:
> 
> Hi Ralph,
> 
> This is the logback manual: http://logback.qos.ch/manual/appenders.html. Here 
> syslog uses suffix patten. Which is then read by syslog server and starting 
> text (say “app: <pattern>”), to segregate application logs.
> This is the Log4J manual: 
> https://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender. 
> This does not discuss any suffix. There is an option to replace whole pattern.
> 
> I want to adapt first thing into second.
> 
> Thanks.
> 
> From: Ralph Goers<mailto:ralph.go...@dslextreme.com>
> Sent: 25 March 2021 10:27 PM
> To: Log4J Users List<mailto:log4j-user@logging.apache.org>
> Subject: Re: Syslog for Log4J 2 & 1
> 
> I don’t understand what you mean by a “suffix pattern”. Can you please 
> elaborate?
> 
> Ralph
> 
>> On Mar 25, 2021, at 8:37 AM, Subhajit Das <subhajitdas...@live.com> wrote:
>> 
>> 
>> Hi,
>> 
>> We are using syslog in our organization with logback.
>> 
>> I want to use log4j instead. But, it seems that there is no suffix pattern 
>> or anything available.
>> 
>> How can I configure the same?
>> 
>> Thanks.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to