Syslog4j

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Syslog4j

EDMONDO SENA
Hi,

Syslog4j is compatible with Log4j 2?
Kind regards.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Syslog4j

Matt Sicker
I’d guess no, but Log4j2 comes with syslog appenders out of the box now.

On Thu, Feb 20, 2020 at 04:30 EDMONDO SENA <[hidden email]> wrote:

> Hi,
>
> Syslog4j is compatible with Log4j 2?
> Kind regards.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
> --
Matt Sicker <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Syslog4j

EDMONDO SENA
Sorry it means that now is it impossible to use syslog4j with log4j 2?
What do you mean out of the box?

//Edmondo.


On 2020/02/20 15:01:25, Matt Sicker <[hidden email]> wrote:

> I’d guess no, but Log4j2 comes with syslog appenders out of the box now.
>
> On Thu, Feb 20, 2020 at 04:30 EDMONDO SENA <[hidden email]> wrote:
>
> > Hi,
> >
> > Syslog4j is compatible with Log4j 2?
> > Kind regards.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> > --
> Matt Sicker <[hidden email]>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Syslog4j

Ralph Goers
See http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender <http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender>

Ralph

> On Feb 20, 2020, at 8:05 AM, EDMONDO SENA <[hidden email]> wrote:
>
> Sorry it means that now is it impossible to use syslog4j with log4j 2?
> What do you mean out of the box?
>
> //Edmondo.
>
>
> On 2020/02/20 15:01:25, Matt Sicker <[hidden email]> wrote:
>> I’d guess no, but Log4j2 comes with syslog appenders out of the box now.
>>
>> On Thu, Feb 20, 2020 at 04:30 EDMONDO SENA <[hidden email]> wrote:
>>
>>> Hi,
>>>
>>> Syslog4j is compatible with Log4j 2?
>>> Kind regards.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>> --
>> Matt Sicker <[hidden email]>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Syslog4j

EDMONDO SENA

Well:

We're using Log4j 2 and we've a class that extends SysLog4jAppenderSkeleton where the import is:

org.productivity.java.syslog4j.impl.log4j.Syslog4jAppenderSkeleton..
Changing the jars the
previous class is inconsistent....


On 2020/02/20 15:12:05, Ralph Goers <[hidden email]> wrote:

> See http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender <http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender>
>
> Ralph
>
> > On Feb 20, 2020, at 8:05 AM, EDMONDO SENA <[hidden email]> wrote:
> >
> > Sorry it means that now is it impossible to use syslog4j with log4j 2?
> > What do you mean out of the box?
> >
> > //Edmondo.
> >
> >
> > On 2020/02/20 15:01:25, Matt Sicker <[hidden email]> wrote:
> >> I’d guess no, but Log4j2 comes with syslog appenders out of the box now.
> >>
> >> On Thu, Feb 20, 2020 at 04:30 EDMONDO SENA <[hidden email]> wrote:
> >>
> >>> Hi,
> >>>
> >>> Syslog4j is compatible with Log4j 2?
> >>> Kind regards.
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: [hidden email]
> >>> For additional commands, e-mail: [hidden email]
> >>>
> >>> --
> >> Matt Sicker <[hidden email]>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Syslog4j

Matt Sicker
What did you customize about that old class? We likely already support the
same features you added in the v2 class. Can you tell us a little more
about your use case?

On Thu, Feb 20, 2020 at 09:22 EDMONDO SENA <[hidden email]> wrote:

>
> Well:
>
> We're using Log4j 2 and we've a class that extends
> SysLog4jAppenderSkeleton where the import is:
>
> org.productivity.java.syslog4j.impl.log4j.Syslog4jAppenderSkeleton..
> Changing the jars the
> previous class is inconsistent....
>
>
> On 2020/02/20 15:12:05, Ralph Goers <[hidden email]> wrote:
> > See
> http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender <
> http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender>
> >
> > Ralph
> >
> > > On Feb 20, 2020, at 8:05 AM, EDMONDO SENA <[hidden email]> wrote:
> > >
> > > Sorry it means that now is it impossible to use syslog4j with log4j 2?
> > > What do you mean out of the box?
> > >
> > > //Edmondo.
> > >
> > >
> > > On 2020/02/20 15:01:25, Matt Sicker <[hidden email]> wrote:
> > >> I’d guess no, but Log4j2 comes with syslog appenders out of the box
> now.
> > >>
> > >> On Thu, Feb 20, 2020 at 04:30 EDMONDO SENA <[hidden email]> wrote:
> > >>
> > >>> Hi,
> > >>>
> > >>> Syslog4j is compatible with Log4j 2?
> > >>> Kind regards.
> > >>>
> > >>> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: [hidden email]
> > >>> For additional commands, e-mail: [hidden email]
> > >>>
> > >>> --
> > >> Matt Sicker <[hidden email]>
> > >>
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
> --
Matt Sicker <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Syslog4j

EDMONDO SENA
That class has been created to face to a bug in a syslog4j library related to the handling of identity when more Appenders are used within the same VM.
We've created some methods like:

- append(LoggingEvent...)
- initialize() for the protocol
- get() and set() SyslogHost....



On 2020/02/20 15:23:58, Matt Sicker <[hidden email]> wrote:

> What did you customize about that old class? We likely already support the
> same features you added in the v2 class. Can you tell us a little more
> about your use case?
>
> On Thu, Feb 20, 2020 at 09:22 EDMONDO SENA <[hidden email]> wrote:
>
> >
> > Well:
> >
> > We're using Log4j 2 and we've a class that extends
> > SysLog4jAppenderSkeleton where the import is:
> >
> > org.productivity.java.syslog4j.impl.log4j.Syslog4jAppenderSkeleton..
> > Changing the jars the
> > previous class is inconsistent....
> >
> >
> > On 2020/02/20 15:12:05, Ralph Goers <[hidden email]> wrote:
> > > See
> > http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender <
> > http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender>
> > >
> > > Ralph
> > >
> > > > On Feb 20, 2020, at 8:05 AM, EDMONDO SENA <[hidden email]> wrote:
> > > >
> > > > Sorry it means that now is it impossible to use syslog4j with log4j 2?
> > > > What do you mean out of the box?
> > > >
> > > > //Edmondo.
> > > >
> > > >
> > > > On 2020/02/20 15:01:25, Matt Sicker <[hidden email]> wrote:
> > > >> I’d guess no, but Log4j2 comes with syslog appenders out of the box
> > now.
> > > >>
> > > >> On Thu, Feb 20, 2020 at 04:30 EDMONDO SENA <[hidden email]> wrote:
> > > >>
> > > >>> Hi,
> > > >>>
> > > >>> Syslog4j is compatible with Log4j 2?
> > > >>> Kind regards.
> > > >>>
> > > >>> ---------------------------------------------------------------------
> > > >>> To unsubscribe, e-mail: [hidden email]
> > > >>> For additional commands, e-mail: [hidden email]
> > > >>>
> > > >>> --
> > > >> Matt Sicker <[hidden email]>
> > > >>
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [hidden email]
> > > > For additional commands, e-mail: [hidden email]
> > > >
> > > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> > --
> Matt Sicker <[hidden email]>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Syslog4j

Matt Sicker
Perhaps some of these new features could be used to replace what you
were doing before?

log4j-api supports the Message API which can be used to log structured
log messages such as for use in syslog. See
https://logging.apache.org/log4j/2.x/manual/messages.html for the API
details. Similarly, we also have the EventLogger
<https://logging.apache.org/log4j/2.x/manual/eventlogging.html> which
can easily be used with a syslog appender.

As for the appender, check
<https://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender>
which shows all the currently available options in the v2 appender. If
there's a missing feature there that you reimplemented in your code,
perhaps a feature request would be appropriate?

On Thu, 20 Feb 2020 at 09:30, EDMONDO SENA <[hidden email]> wrote:

>
> That class has been created to face to a bug in a syslog4j library related to the handling of identity when more Appenders are used within the same VM.
> We've created some methods like:
>
> - append(LoggingEvent...)
> - initialize() for the protocol
> - get() and set() SyslogHost....
>
>
>
> On 2020/02/20 15:23:58, Matt Sicker <[hidden email]> wrote:
> > What did you customize about that old class? We likely already support the
> > same features you added in the v2 class. Can you tell us a little more
> > about your use case?
> >
> > On Thu, Feb 20, 2020 at 09:22 EDMONDO SENA <[hidden email]> wrote:
> >
> > >
> > > Well:
> > >
> > > We're using Log4j 2 and we've a class that extends
> > > SysLog4jAppenderSkeleton where the import is:
> > >
> > > org.productivity.java.syslog4j.impl.log4j.Syslog4jAppenderSkeleton..
> > > Changing the jars the
> > > previous class is inconsistent....
> > >
> > >
> > > On 2020/02/20 15:12:05, Ralph Goers <[hidden email]> wrote:
> > > > See
> > > http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender <
> > > http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender>
> > > >
> > > > Ralph
> > > >
> > > > > On Feb 20, 2020, at 8:05 AM, EDMONDO SENA <[hidden email]> wrote:
> > > > >
> > > > > Sorry it means that now is it impossible to use syslog4j with log4j 2?
> > > > > What do you mean out of the box?
> > > > >
> > > > > //Edmondo.
> > > > >
> > > > >
> > > > > On 2020/02/20 15:01:25, Matt Sicker <[hidden email]> wrote:
> > > > >> I’d guess no, but Log4j2 comes with syslog appenders out of the box
> > > now.
> > > > >>
> > > > >> On Thu, Feb 20, 2020 at 04:30 EDMONDO SENA <[hidden email]> wrote:
> > > > >>
> > > > >>> Hi,
> > > > >>>
> > > > >>> Syslog4j is compatible with Log4j 2?
> > > > >>> Kind regards.
> > > > >>>
> > > > >>> ---------------------------------------------------------------------
> > > > >>> To unsubscribe, e-mail: [hidden email]
> > > > >>> For additional commands, e-mail: [hidden email]
> > > > >>>
> > > > >>> --
> > > > >> Matt Sicker <[hidden email]>
> > > > >>
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: [hidden email]
> > > > > For additional commands, e-mail: [hidden email]
> > > > >
> > > > >
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> > > --
> > Matt Sicker <[hidden email]>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


--
Matt Sicker <[hidden email]>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Syslog4j

Ralph Goers
In reply to this post by EDMONDO SENA
Telling us that you overrode a class to fix a bug in the library doesn’t really help us much.  What are you using syslog4j for?  If you are simply trying to write log events to syslog Log4j 2 already supports that.

Ralph

> On Feb 20, 2020, at 8:30 AM, EDMONDO SENA <[hidden email]> wrote:
>
> That class has been created to face to a bug in a syslog4j library related to the handling of identity when more Appenders are used within the same VM.
> We've created some methods like:
>
> - append(LoggingEvent...)
> - initialize() for the protocol
> - get() and set() SyslogHost....
>
>
>
> On 2020/02/20 15:23:58, Matt Sicker <[hidden email]> wrote:
>> What did you customize about that old class? We likely already support the
>> same features you added in the v2 class. Can you tell us a little more
>> about your use case?
>>
>> On Thu, Feb 20, 2020 at 09:22 EDMONDO SENA <[hidden email]> wrote:
>>
>>>
>>> Well:
>>>
>>> We're using Log4j 2 and we've a class that extends
>>> SysLog4jAppenderSkeleton where the import is:
>>>
>>> org.productivity.java.syslog4j.impl.log4j.Syslog4jAppenderSkeleton..
>>> Changing the jars the
>>> previous class is inconsistent....
>>>
>>>
>>> On 2020/02/20 15:12:05, Ralph Goers <[hidden email]> wrote:
>>>> See
>>> http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender <
>>> http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender>
>>>>
>>>> Ralph
>>>>
>>>>> On Feb 20, 2020, at 8:05 AM, EDMONDO SENA <[hidden email]> wrote:
>>>>>
>>>>> Sorry it means that now is it impossible to use syslog4j with log4j 2?
>>>>> What do you mean out of the box?
>>>>>
>>>>> //Edmondo.
>>>>>
>>>>>
>>>>> On 2020/02/20 15:01:25, Matt Sicker <[hidden email]> wrote:
>>>>>> I’d guess no, but Log4j2 comes with syslog appenders out of the box
>>> now.
>>>>>>
>>>>>> On Thu, Feb 20, 2020 at 04:30 EDMONDO SENA <[hidden email]> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Syslog4j is compatible with Log4j 2?
>>>>>>> Kind regards.
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: [hidden email]
>>>>>>> For additional commands, e-mail: [hidden email]
>>>>>>>
>>>>>>> --
>>>>>> Matt Sicker <[hidden email]>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [hidden email]
>>>>> For additional commands, e-mail: [hidden email]
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>> --
>> Matt Sicker <[hidden email]>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Syslog4j

EDMONDO SENA
Hi Ralph,

How you know in lo4j1.x:

Syslog4jAppenderSkeleton extends org.apache.log4j.AppenderSkeleton implements
                                                          org.productivity.java.syslog4j.SyslogConstants, now:

I need to use these methods for our scope, namely:
setLayout, getErrorHandler, setName.

Is possible to use these methods in Log4j 2 somehow?



On 2020/02/20 16:48:42, Ralph Goers <[hidden email]> wrote:

> Telling us that you overrode a class to fix a bug in the library doesn’t really help us much.  What are you using syslog4j for?  If you are simply trying to write log events to syslog Log4j 2 already supports that.
>
> Ralph
>
> > On Feb 20, 2020, at 8:30 AM, EDMONDO SENA <[hidden email]> wrote:
> >
> > That class has been created to face to a bug in a syslog4j library related to the handling of identity when more Appenders are used within the same VM.
> > We've created some methods like:
> >
> > - append(LoggingEvent...)
> > - initialize() for the protocol
> > - get() and set() SyslogHost....
> >
> >
> >
> > On 2020/02/20 15:23:58, Matt Sicker <[hidden email]> wrote:
> >> What did you customize about that old class? We likely already support the
> >> same features you added in the v2 class. Can you tell us a little more
> >> about your use case?
> >>
> >> On Thu, Feb 20, 2020 at 09:22 EDMONDO SENA <[hidden email]> wrote:
> >>
> >>>
> >>> Well:
> >>>
> >>> We're using Log4j 2 and we've a class that extends
> >>> SysLog4jAppenderSkeleton where the import is:
> >>>
> >>> org.productivity.java.syslog4j.impl.log4j.Syslog4jAppenderSkeleton..
> >>> Changing the jars the
> >>> previous class is inconsistent....
> >>>
> >>>
> >>> On 2020/02/20 15:12:05, Ralph Goers <[hidden email]> wrote:
> >>>> See
> >>> http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender <
> >>> http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender>
> >>>>
> >>>> Ralph
> >>>>
> >>>>> On Feb 20, 2020, at 8:05 AM, EDMONDO SENA <[hidden email]> wrote:
> >>>>>
> >>>>> Sorry it means that now is it impossible to use syslog4j with log4j 2?
> >>>>> What do you mean out of the box?
> >>>>>
> >>>>> //Edmondo.
> >>>>>
> >>>>>
> >>>>> On 2020/02/20 15:01:25, Matt Sicker <[hidden email]> wrote:
> >>>>>> I’d guess no, but Log4j2 comes with syslog appenders out of the box
> >>> now.
> >>>>>>
> >>>>>> On Thu, Feb 20, 2020 at 04:30 EDMONDO SENA <[hidden email]> wrote:
> >>>>>>
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> Syslog4j is compatible with Log4j 2?
> >>>>>>> Kind regards.
> >>>>>>>
> >>>>>>> ---------------------------------------------------------------------
> >>>>>>> To unsubscribe, e-mail: [hidden email]
> >>>>>>> For additional commands, e-mail: [hidden email]
> >>>>>>>
> >>>>>>> --
> >>>>>> Matt Sicker <[hidden email]>
> >>>>>>
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: [hidden email]
> >>>>> For additional commands, e-mail: [hidden email]
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: [hidden email]
> >>> For additional commands, e-mail: [hidden email]
> >>>
> >>> --
> >> Matt Sicker <[hidden email]>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Syslog4j

Ralph Goers
I can’t answer that since I still don’t know what the problem is you are trying to solve.  Log4j 2 has an Appender interface. You could write a custom Appender that implements that, but that would be silly. Log4j 2’s SyslogAppender extends the SocketAppender, which extends AbstractOutputStreamAppender, which extends AbstractAppender. All of those are valid extension points. Log4j 2’s Appender interface has getName(), getErrorHandler() and getLayout() methods, but does not have a setName() or setLayout() method since those are provided in the constructor and are final.

AppenderSkeleton only exists in log4j-1.2-api for compatibility and will act as a no-op when you use a Log4j 2 configuration file.

Again, what are you trying to do with syslog4j that Log4j 2’s SocketAppender doesn’t support?

Ralph



> On Feb 21, 2020, at 3:57 AM, EDMONDO SENA <[hidden email]> wrote:
>
> Hi Ralph,
>
> How you know in lo4j1.x:
>
> Syslog4jAppenderSkeleton extends org.apache.log4j.AppenderSkeleton implements
>                                                          org.productivity.java.syslog4j.SyslogConstants, now:
>
> I need to use these methods for our scope, namely:
> setLayout, getErrorHandler, setName.
>
> Is possible to use these methods in Log4j 2 somehow?
>
>
>
> On 2020/02/20 16:48:42, Ralph Goers <[hidden email]> wrote:
>> Telling us that you overrode a class to fix a bug in the library doesn’t really help us much.  What are you using syslog4j for?  If you are simply trying to write log events to syslog Log4j 2 already supports that.
>>
>> Ralph
>>
>>> On Feb 20, 2020, at 8:30 AM, EDMONDO SENA <[hidden email]> wrote:
>>>
>>> That class has been created to face to a bug in a syslog4j library related to the handling of identity when more Appenders are used within the same VM.
>>> We've created some methods like:
>>>
>>> - append(LoggingEvent...)
>>> - initialize() for the protocol
>>> - get() and set() SyslogHost....
>>>
>>>
>>>
>>> On 2020/02/20 15:23:58, Matt Sicker <[hidden email]> wrote:
>>>> What did you customize about that old class? We likely already support the
>>>> same features you added in the v2 class. Can you tell us a little more
>>>> about your use case?
>>>>
>>>> On Thu, Feb 20, 2020 at 09:22 EDMONDO SENA <[hidden email]> wrote:
>>>>
>>>>>
>>>>> Well:
>>>>>
>>>>> We're using Log4j 2 and we've a class that extends
>>>>> SysLog4jAppenderSkeleton where the import is:
>>>>>
>>>>> org.productivity.java.syslog4j.impl.log4j.Syslog4jAppenderSkeleton..
>>>>> Changing the jars the
>>>>> previous class is inconsistent....
>>>>>
>>>>>
>>>>> On 2020/02/20 15:12:05, Ralph Goers <[hidden email]> wrote:
>>>>>> See
>>>>> http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender <
>>>>> http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender>
>>>>>>
>>>>>> Ralph
>>>>>>
>>>>>>> On Feb 20, 2020, at 8:05 AM, EDMONDO SENA <[hidden email]> wrote:
>>>>>>>
>>>>>>> Sorry it means that now is it impossible to use syslog4j with log4j 2?
>>>>>>> What do you mean out of the box?
>>>>>>>
>>>>>>> //Edmondo.
>>>>>>>
>>>>>>>
>>>>>>> On 2020/02/20 15:01:25, Matt Sicker <[hidden email]> wrote:
>>>>>>>> I’d guess no, but Log4j2 comes with syslog appenders out of the box
>>>>> now.
>>>>>>>>
>>>>>>>> On Thu, Feb 20, 2020 at 04:30 EDMONDO SENA <[hidden email]> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> Syslog4j is compatible with Log4j 2?
>>>>>>>>> Kind regards.
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: [hidden email]
>>>>>>>>> For additional commands, e-mail: [hidden email]
>>>>>>>>>
>>>>>>>>> --
>>>>>>>> Matt Sicker <[hidden email]>
>>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: [hidden email]
>>>>>>> For additional commands, e-mail: [hidden email]
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [hidden email]
>>>>> For additional commands, e-mail: [hidden email]
>>>>>
>>>>> --
>>>> Matt Sicker <[hidden email]>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Syslog4j

EDMONDO SENA
Hi Ralph,

we've send logs towards destination Syslog server.
We cannot use SocketAppender because we've using Syslog protocol.




On 2020/02/21 15:08:06, Ralph Goers <[hidden email]> wrote:

> I can’t answer that since I still don’t know what the problem is you are trying to solve.  Log4j 2 has an Appender interface. You could write a custom Appender that implements that, but that would be silly. Log4j 2’s SyslogAppender extends the SocketAppender, which extends AbstractOutputStreamAppender, which extends AbstractAppender. All of those are valid extension points. Log4j 2’s Appender interface has getName(), getErrorHandler() and getLayout() methods, but does not have a setName() or setLayout() method since those are provided in the constructor and are final.
>
> AppenderSkeleton only exists in log4j-1.2-api for compatibility and will act as a no-op when you use a Log4j 2 configuration file.
>
> Again, what are you trying to do with syslog4j that Log4j 2’s SocketAppender doesn’t support?
>
> Ralph
>
>
>
> > On Feb 21, 2020, at 3:57 AM, EDMONDO SENA <[hidden email]> wrote:
> >
> > Hi Ralph,
> >
> > How you know in lo4j1.x:
> >
> > Syslog4jAppenderSkeleton extends org.apache.log4j.AppenderSkeleton implements
> >                                                          org.productivity.java.syslog4j.SyslogConstants, now:
> >
> > I need to use these methods for our scope, namely:
> > setLayout, getErrorHandler, setName.
> >
> > Is possible to use these methods in Log4j 2 somehow?
> >
> >
> >
> > On 2020/02/20 16:48:42, Ralph Goers <[hidden email]> wrote:
> >> Telling us that you overrode a class to fix a bug in the library doesn’t really help us much.  What are you using syslog4j for?  If you are simply trying to write log events to syslog Log4j 2 already supports that.
> >>
> >> Ralph
> >>
> >>> On Feb 20, 2020, at 8:30 AM, EDMONDO SENA <[hidden email]> wrote:
> >>>
> >>> That class has been created to face to a bug in a syslog4j library related to the handling of identity when more Appenders are used within the same VM.
> >>> We've created some methods like:
> >>>
> >>> - append(LoggingEvent...)
> >>> - initialize() for the protocol
> >>> - get() and set() SyslogHost....
> >>>
> >>>
> >>>
> >>> On 2020/02/20 15:23:58, Matt Sicker <[hidden email]> wrote:
> >>>> What did you customize about that old class? We likely already support the
> >>>> same features you added in the v2 class. Can you tell us a little more
> >>>> about your use case?
> >>>>
> >>>> On Thu, Feb 20, 2020 at 09:22 EDMONDO SENA <[hidden email]> wrote:
> >>>>
> >>>>>
> >>>>> Well:
> >>>>>
> >>>>> We're using Log4j 2 and we've a class that extends
> >>>>> SysLog4jAppenderSkeleton where the import is:
> >>>>>
> >>>>> org.productivity.java.syslog4j.impl.log4j.Syslog4jAppenderSkeleton..
> >>>>> Changing the jars the
> >>>>> previous class is inconsistent....
> >>>>>
> >>>>>
> >>>>> On 2020/02/20 15:12:05, Ralph Goers <[hidden email]> wrote:
> >>>>>> See
> >>>>> http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender <
> >>>>> http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender>
> >>>>>>
> >>>>>> Ralph
> >>>>>>
> >>>>>>> On Feb 20, 2020, at 8:05 AM, EDMONDO SENA <[hidden email]> wrote:
> >>>>>>>
> >>>>>>> Sorry it means that now is it impossible to use syslog4j with log4j 2?
> >>>>>>> What do you mean out of the box?
> >>>>>>>
> >>>>>>> //Edmondo.
> >>>>>>>
> >>>>>>>
> >>>>>>> On 2020/02/20 15:01:25, Matt Sicker <[hidden email]> wrote:
> >>>>>>>> I’d guess no, but Log4j2 comes with syslog appenders out of the box
> >>>>> now.
> >>>>>>>>
> >>>>>>>> On Thu, Feb 20, 2020 at 04:30 EDMONDO SENA <[hidden email]> wrote:
> >>>>>>>>
> >>>>>>>>> Hi,
> >>>>>>>>>
> >>>>>>>>> Syslog4j is compatible with Log4j 2?
> >>>>>>>>> Kind regards.
> >>>>>>>>>
> >>>>>>>>> ---------------------------------------------------------------------
> >>>>>>>>> To unsubscribe, e-mail: [hidden email]
> >>>>>>>>> For additional commands, e-mail: [hidden email]
> >>>>>>>>>
> >>>>>>>>> --
> >>>>>>>> Matt Sicker <[hidden email]>
> >>>>>>>>
> >>>>>>>
> >>>>>>> ---------------------------------------------------------------------
> >>>>>>> To unsubscribe, e-mail: [hidden email]
> >>>>>>> For additional commands, e-mail: [hidden email]
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: [hidden email]
> >>>>> For additional commands, e-mail: [hidden email]
> >>>>>
> >>>>> --
> >>>> Matt Sicker <[hidden email]>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: [hidden email]
> >>> For additional commands, e-mail: [hidden email]
> >>>
> >>>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Syslog4j

Ralph Goers
Yes, you could use the SocketAppender. You would just have to use the appropriate Layout with the SocketAppender.
There is no reason to do 1 because Log4j has a SyslogAppender that combines the appropriate Layout for you.

I’m getting frustrated because both Matt and I have already told you more than once that Log4j ships with a SyslogAppender. Just use it. If you can’t, tell us why.

Ralph


> On Feb 21, 2020, at 8:24 AM, EDMONDO SENA <[hidden email]> wrote:
>
> Hi Ralph,
>
> we've send logs towards destination Syslog server.
> We cannot use SocketAppender because we've using Syslog protocol.
>
>
>
>
> On 2020/02/21 15:08:06, Ralph Goers <[hidden email]> wrote:
>> I can’t answer that since I still don’t know what the problem is you are trying to solve.  Log4j 2 has an Appender interface. You could write a custom Appender that implements that, but that would be silly. Log4j 2’s SyslogAppender extends the SocketAppender, which extends AbstractOutputStreamAppender, which extends AbstractAppender. All of those are valid extension points. Log4j 2’s Appender interface has getName(), getErrorHandler() and getLayout() methods, but does not have a setName() or setLayout() method since those are provided in the constructor and are final.
>>
>> AppenderSkeleton only exists in log4j-1.2-api for compatibility and will act as a no-op when you use a Log4j 2 configuration file.
>>
>> Again, what are you trying to do with syslog4j that Log4j 2’s SocketAppender doesn’t support?
>>
>> Ralph
>>
>>
>>
>>> On Feb 21, 2020, at 3:57 AM, EDMONDO SENA <[hidden email]> wrote:
>>>
>>> Hi Ralph,
>>>
>>> How you know in lo4j1.x:
>>>
>>> Syslog4jAppenderSkeleton extends org.apache.log4j.AppenderSkeleton implements
>>>                                                         org.productivity.java.syslog4j.SyslogConstants, now:
>>>
>>> I need to use these methods for our scope, namely:
>>> setLayout, getErrorHandler, setName.
>>>
>>> Is possible to use these methods in Log4j 2 somehow?
>>>
>>>
>>>
>>> On 2020/02/20 16:48:42, Ralph Goers <[hidden email]> wrote:
>>>> Telling us that you overrode a class to fix a bug in the library doesn’t really help us much.  What are you using syslog4j for?  If you are simply trying to write log events to syslog Log4j 2 already supports that.
>>>>
>>>> Ralph
>>>>
>>>>> On Feb 20, 2020, at 8:30 AM, EDMONDO SENA <[hidden email]> wrote:
>>>>>
>>>>> That class has been created to face to a bug in a syslog4j library related to the handling of identity when more Appenders are used within the same VM.
>>>>> We've created some methods like:
>>>>>
>>>>> - append(LoggingEvent...)
>>>>> - initialize() for the protocol
>>>>> - get() and set() SyslogHost....
>>>>>
>>>>>
>>>>>
>>>>> On 2020/02/20 15:23:58, Matt Sicker <[hidden email]> wrote:
>>>>>> What did you customize about that old class? We likely already support the
>>>>>> same features you added in the v2 class. Can you tell us a little more
>>>>>> about your use case?
>>>>>>
>>>>>> On Thu, Feb 20, 2020 at 09:22 EDMONDO SENA <[hidden email]> wrote:
>>>>>>
>>>>>>>
>>>>>>> Well:
>>>>>>>
>>>>>>> We're using Log4j 2 and we've a class that extends
>>>>>>> SysLog4jAppenderSkeleton where the import is:
>>>>>>>
>>>>>>> org.productivity.java.syslog4j.impl.log4j.Syslog4jAppenderSkeleton..
>>>>>>> Changing the jars the
>>>>>>> previous class is inconsistent....
>>>>>>>
>>>>>>>
>>>>>>> On 2020/02/20 15:12:05, Ralph Goers <[hidden email]> wrote:
>>>>>>>> See
>>>>>>> http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender <
>>>>>>> http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender>
>>>>>>>>
>>>>>>>> Ralph
>>>>>>>>
>>>>>>>>> On Feb 20, 2020, at 8:05 AM, EDMONDO SENA <[hidden email]> wrote:
>>>>>>>>>
>>>>>>>>> Sorry it means that now is it impossible to use syslog4j with log4j 2?
>>>>>>>>> What do you mean out of the box?
>>>>>>>>>
>>>>>>>>> //Edmondo.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 2020/02/20 15:01:25, Matt Sicker <[hidden email]> wrote:
>>>>>>>>>> I’d guess no, but Log4j2 comes with syslog appenders out of the box
>>>>>>> now.
>>>>>>>>>>
>>>>>>>>>> On Thu, Feb 20, 2020 at 04:30 EDMONDO SENA <[hidden email]> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> Syslog4j is compatible with Log4j 2?
>>>>>>>>>>> Kind regards.
>>>>>>>>>>>
>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>> To unsubscribe, e-mail: [hidden email]
>>>>>>>>>>> For additional commands, e-mail: [hidden email]
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>> Matt Sicker <[hidden email]>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: [hidden email]
>>>>>>>>> For additional commands, e-mail: [hidden email]
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: [hidden email]
>>>>>>> For additional commands, e-mail: [hidden email]
>>>>>>>
>>>>>>> --
>>>>>> Matt Sicker <[hidden email]>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [hidden email]
>>>>> For additional commands, e-mail: [hidden email]
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>