Hi,

not sure what exactly you need, but there is a native SyslogAppender:
https://github.com/weber-oldenburg/jni-syslog

Regards,
    Volker

Am Fr., 26. März 2021 um 02:27 Uhr schrieb Subhajit Das <
subhajitdas...@live.com>:

> Hi Ralph,
>
> The issue that, I need this for both Log4J 1.2 and 2.x.
>
> But, 1.2 is EOL.
>
> There seems to be a Layout option, which should allow any pattern layout.
> But, somehow it is not working.
>
> Thanks,
> Subhajit
>
>
> From: Ralph Goers<mailto:ralph.go...@dslextreme.com>
> Sent: 26 March 2021 12:45 AM
> To: Log4J Users List<mailto:log4j-user@logging.apache.org>
> Subject: Re: Syslog for Log4J 2 & 1
>
> 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
>
>

-- 
inexso - information exchange solutions GmbH
Ofener Straße 30 | 26121 Oldenburg
www.inexso.de

Reply via email to