Re: Syslog for Log4J 2 & 1

Volker Weber <[email protected]>
Newsgroups gmane.comp.jakarta.log4j.user
Message-ID <CAHeGRnpvzRvfYVM-A5X6DRG2ZsWL60HSaePR9cN3881cCznrzg@mail.gmail.com>
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 <
[email protected]>:

> 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:[email protected]>
> Sent: 26 March 2021 12:45 AM
> To: Log4J Users List<mailto:[email protected]>
> 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 <[email protected]>
> 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:[email protected]>
> > Sent: 25 March 2021 10:27 PM
> > To: Log4J Users List<mailto:[email protected]>
> > 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 <[email protected]>
> 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: [email protected]
> > For additional commands, e-mail: [email protected]
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

-- 
inexso - information exchange solutions GmbH
Ofener Straße 30 | 26121 Oldenburg
www.inexso.de
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.