gearpump-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Wang <fvunic...@gmail.com>
Subject Re: Configuring logging for selected application
Date Tue, 12 Jul 2016 03:39:36 GMT
Actually we have not tested this scenario, I think all the related code is
in org.apache.gearpump.util.LogUtil


2016-07-11 21:17 GMT+08:00 Karol Brejna <karolbrejna@apache.org>:

> I had problems configuring a Gearpump application logging.
>
> I was trying to configure sending the logs to logstash, but it
> shouldn't matter - I was not able to force new log4j config on the
> app.
>
> To reproduce:
> 1. https://github.com/gearpump/gearpump-java-example was used as a
> test app (with some logging added)
>
> 2. the following config file was added so after compilation it was
> accessible in the classpath:
> {code}
> log4j.rootLogger=info,tcp
>
> log4j.appender.tcp=org.apache.log4j.net.SocketAppender
> log4j.appender.tcp.Port=3456
> log4j.appender.tcp.RemoteHost=localhost
> log4j.appender.tcp.ReconnectionDelay=10000
> log4j.appender.tcp.Application=playground
> {code}
>
> 3. gearpump was ran using bin/local on localhos, logstash configured
> to receive connections on port 3456 on localhost
>
> 4. after deploying the app (that contains log4.properties), no logs
> are sent to logstash
> ("normal" log files are created and written).
>
> The config was tested with standalone java app to be sure that
> app->logstash communication works.
>
> Also, adding similar config to conf/log4j.properties and runing gearpump
> worked:
>
> {code}
> # The application logger setting
> gearpump.application.logger=ApplicationLogAppender, tcp
>
> ...
>
> log4j.appender.tcp=org.apache.log4j.net.SocketAppender
> log4j.appender.tcp.Port=3456
> log4j.appender.tcp.RemoteHost=localhost
> log4j.appender.tcp.ReconnectionDelay=10000
> log4j.appender.tcp.Application=playground
> {code}
>
> Logs from every app deployed to gearpump was sent to logstash.
>
> What is the proper way to configure logging on per app basis?
>

Mime
View raw message