Hi Sachin,

If you check kafka-run-class.bat you can see that when environment variable
KAFKA_LOG4J_OPTS is not provided, a default log4j configuration under
"tools" will be loaded. So setting the environment variable to something
like 
"-Dlog4j.configurationFile=file:///D:/kafka_2.10-0.10.1.1/log4js.properties"
should to the trick for you.

Joris

On Sat, Feb 4, 2017 at 11:38 AM Sachin Mittal <[email protected]> wrote:

Hi,
As suggested this is how I am starting my stream

D:\kafka_2.10-0.10.1.1>bin\windows\kafka-run-class.bat -Dlog4j.debug
-Dlog4j.configurationFile=file:///D:/kafka_2.10-0.10.1.1/log4js.properties
TestKafkaWindowStream
log4j: Using URL
[file:D:/kafka_2.10-0.10.1.1/config/tools-log4j.properties] for automatic
log4j configuration.

You can see it somehow does not pick my log4j properties but always picks
some tools-log4j.properties.

I have tried many different ways to specify log4j.configurationFile but it
always seem to be picking up a different log4j properties file.

So is it something that we should always configure our log4j under
tools-log4j.properties?

Thanks
Sachin



On Fri, Jan 27, 2017 at 2:31 PM, Damian Guy <[email protected]> wrote:

> -Dlog4j.configuration=your-log4j.properties
>

Reply via email to