You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by "hsy541@gmail.com" <hs...@gmail.com> on 2016/06/24 17:27:46 UTC
log4j setting for embedded kafka server
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!
Re: log4j setting for embedded kafka server
Posted by Guozhang Wang <wa...@gmail.com>.
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, hsy541@gmail.com <hs...@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