Re: log4j setting for embedded kafka server

2016-06-24 Thread Guozhang Wang
Siyuan,

log4j.properties only gets read by the kafka-run-class.sh scripts:

KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/config/tools-log4j.properties


If you start the server within your Java application, you need to try
to pass "log4j.configuration" to Kafka.


Guozhang


On Fri, Jun 24, 2016 at 10:27 AM, hsy...@gmail.com  wrote:

> Hi guys,
>
> I start server grammatically in my application using
> KafkaStatableServer.startup() method. And in the log4j.properties setting.
> I add this
>
> log4j.logger.org.apacke.kafka=WARN
> log4j.logger.kafka=WARN
>
> But I always get INFO log, Do you guys know how to enforce the log level
> here? Thanks!
>



-- 
-- Guozhang


log4j setting for embedded kafka server

2016-06-24 Thread hsy...@gmail.com
Hi guys,

I start server grammatically in my application using
KafkaStatableServer.startup() method. And in the log4j.properties setting.
I add this

log4j.logger.org.apacke.kafka=WARN
log4j.logger.kafka=WARN

But I always get INFO log, Do you guys know how to enforce the log level
here? Thanks!