You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geode.apache.org by Catherine Johnson <ca...@yahoo.com> on 2015/09/02 22:58:16 UTC

Listening to log4j events

Is there a way in Geode to listen directly to the log4j events on some port, rather than picking them up in the file? I am interested in streaming the events into the ELK stack, rather than picking up the logs after the fact.

Thanks!
Catherine

Re: Listening to log4j events

Posted by Catherine Johnson <ca...@yahoo.com>.
log4j is already implemented in Geode as the logging infra. I was wondering if if was already configured in such a way that there was just a port I could listen to, rather than setting this up manually myself.

CJ

> On Sep 2, 2015, at 2:01 PM, Roman Shaposhnik <ro...@shaposhnik.org> wrote:
> 
> On Wed, Sep 2, 2015 at 1:58 PM, Catherine Johnson
> <ca...@yahoo.com> wrote:
>> Is there a way in Geode to listen directly to the log4j events on some port, rather
>> than picking them up in the file? I am interested in streaming the events into the ELK
>> stack, rather than picking up the logs after the fact.
> 
> Isn't it just a question of configuring a SocketAppender as a log4j
> appender in Geode?
> 
> Thanks,
> Roman.


Re: Listening to log4j events

Posted by Catherine Johnson <ca...@yahoo.com>.
Thanks Dan!

> On Sep 2, 2015, at 2:05 PM, Dan Smith <ds...@pivotal.io> wrote:
> 
> Geode is using log4j2, so all you need to do is provide a log4j2 configuration file and you can use any log4j2 appenders, including the socket appender. Geode has a default log4j2.xml file, but if you provide your own it will use that instead.
> 
> https://logging.apache.org/log4j/2.x/manual/configuration.html <https://logging.apache.org/log4j/2.x/manual/configuration.html>
> 
> -Dan
> 
> On Wed, Sep 2, 2015 at 2:01 PM, Roman Shaposhnik <roman@shaposhnik.org <ma...@shaposhnik.org>> wrote:
> On Wed, Sep 2, 2015 at 1:58 PM, Catherine Johnson
> <catherinej30@yahoo.com <ma...@yahoo.com>> wrote:
> > Is there a way in Geode to listen directly to the log4j events on some port, rather
> > than picking them up in the file? I am interested in streaming the events into the ELK
> > stack, rather than picking up the logs after the fact.
> 
> Isn't it just a question of configuring a SocketAppender as a log4j
> appender in Geode?
> 
> Thanks,
> Roman.
> 


Re: Listening to log4j events

Posted by Dan Smith <ds...@pivotal.io>.
Geode is using log4j2, so all you need to do is provide a log4j2
configuration file and you can use any log4j2 appenders, including the
socket appender. Geode has a default log4j2.xml file, but if you provide
your own it will use that instead.

https://logging.apache.org/log4j/2.x/manual/configuration.html

-Dan

On Wed, Sep 2, 2015 at 2:01 PM, Roman Shaposhnik <ro...@shaposhnik.org>
wrote:

> On Wed, Sep 2, 2015 at 1:58 PM, Catherine Johnson
> <ca...@yahoo.com> wrote:
> > Is there a way in Geode to listen directly to the log4j events on some
> port, rather
> > than picking them up in the file? I am interested in streaming the
> events into the ELK
> > stack, rather than picking up the logs after the fact.
>
> Isn't it just a question of configuring a SocketAppender as a log4j
> appender in Geode?
>
> Thanks,
> Roman.
>

Re: Listening to log4j events

Posted by Roman Shaposhnik <ro...@shaposhnik.org>.
On Wed, Sep 2, 2015 at 1:58 PM, Catherine Johnson
<ca...@yahoo.com> wrote:
> Is there a way in Geode to listen directly to the log4j events on some port, rather
> than picking them up in the file? I am interested in streaming the events into the ELK
> stack, rather than picking up the logs after the fact.

Isn't it just a question of configuring a SocketAppender as a log4j
appender in Geode?

Thanks,
Roman.

Re: Listening to log4j events

Posted by james bedenbaugh <jb...@pivotal.io>.
Or you could use SpringXD and tail the file as a source and sink it into
whatever. . .

On Wed, Sep 2, 2015 at 3:58 PM, Catherine Johnson <ca...@yahoo.com>
wrote:

> Is there a way in Geode to listen directly to the log4j events on some
> port, rather than picking them up in the file? I am interested in streaming
> the events into the ELK stack, rather than picking up the logs after the
> fact.
>
> Thanks!
> Catherine




-- 
Regards,
Jim Bedenbaugh
Advisory Data Engineer
Pivotal Software