Sorry, I have just realized that order of starting kafka server and
zookeeper does not matter as we are exporting the KAFKA_LOG4J_OPTS is
exported from both startup scripts. It always picks up log4j file if we do
not specify KAFKA_LOG4J_OPTS.

I am using confluent data platform ( for Kafka). They are not
exporting KAFKA_LOG4J_OPTS in the startup scripts.

Please share your thoughts on adding appender to redirect logs to different
file instead of console.





On Fri, Nov 6, 2015 at 5:27 PM, Raju Bairishetti <r...@apache.org> wrote:

> Hello dev,
>    I have recently started working on the kafka. I am finding the log4j
> properties under config directory. We are using this log4j file from the
> respective daemon scripts. Ex: kaka-server-start.sh & zookeeper-start.sh
> scripts. I am not seeing any log appender for zookeeper daemon in the log4j
> properties. *IMO, we should add a log appender for zookeeper in the log4j
> properties file to redirect zookeeper logs to different file.*
>
> I can find two things are here:
> 1) If I start zookeeper followed by kafka server then zookeeper logs will
> be printed on the console as it picks the tools-log4j.properties file.
>
> 2) If I start kafka server first and followed by zookeeper then it picks
> the log4j file as KAFKA_LOG4J_OPTS has already set by kafka server startup
> script.  But still it prints the zookeeper logs on console only.
>
> Thanks,
> Raju B
>
>
>


-- 
Thanks
Raju Bairishetti,

www.inmobi.com




*2012 ME Best Mobile Ad Network Award Winner

[image: http://www.inmobi.com/press-releases/files/2013/02/MIT.png]

Reply via email to