You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Arunkumar <pm...@yahoo.com.INVALID> on 2017/11/09 22:17:06 UTC

Migrating from log4j 1 to log4j 2

Hi All
We have a requirement to migrate log4J 1.x to log4j 2 for our kafka brokers using log4j bridge utility. According to Apache Docs the code must not call DOMConfigurator or PropertyConfigurator class, But when I dig into the code I see on Tools package and other packages they have used PropertyConfigurator. I just wanted to double check if any one has any insight on this. If above statement is true, it is not feasible to migrate, any one please confirm.
Thanks in advanceArunkumar Pichaimuthu, PMP

Re: Migrating from log4j 1 to log4j 2

Posted by Arunkumar <pm...@yahoo.com.INVALID>.
Hi Ted
Thanks for quick response. Yes, I know it is used. But my question is if I migrate without changing the code will it break anything. We are using Confluent Kafka and we cannot modify kafka code. All I can do is change log4j 1.2.7 jar to latest,  create log4j.xml  and add log4j bridge utility jar. Please let me know on this.
ThanksArunkumar Pichaimuthu, PMP 

    On Thursday, November 9, 2017, 4:23:43 PM CST, Ted Yu <yu...@gmail.com> wrote:  
 
 PropertyConfigurator is used here:

https://github.com/apache/kafka/blob/trunk/tools/src/main/java/org/apache/kafka/tools/VerifiableLog4jAppender.java#L233

On Thu, Nov 9, 2017 at 2:17 PM, Arunkumar <pm...@yahoo.com.invalid>
wrote:

> Hi All
> We have a requirement to migrate log4J 1.x to log4j 2 for our kafka
> brokers using log4j bridge utility. According to Apache Docs the code must
> not call DOMConfigurator or PropertyConfigurator class, But when I dig into
> the code I see on Tools package and other packages they have used
> PropertyConfigurator. I just wanted to double check if any one has any
> insight on this. If above statement is true, it is not feasible to migrate,
> any one please confirm.
> Thanks in advanceArunkumar Pichaimuthu, PMP
  

Re: Migrating from log4j 1 to log4j 2

Posted by Ted Yu <yu...@gmail.com>.
PropertyConfigurator is used here:

https://github.com/apache/kafka/blob/trunk/tools/src/main/java/org/apache/kafka/tools/VerifiableLog4jAppender.java#L233

On Thu, Nov 9, 2017 at 2:17 PM, Arunkumar <pm...@yahoo.com.invalid>
wrote:

> Hi All
> We have a requirement to migrate log4J 1.x to log4j 2 for our kafka
> brokers using log4j bridge utility. According to Apache Docs the code must
> not call DOMConfigurator or PropertyConfigurator class, But when I dig into
> the code I see on Tools package and other packages they have used
> PropertyConfigurator. I just wanted to double check if any one has any
> insight on this. If above statement is true, it is not feasible to migrate,
> any one please confirm.
> Thanks in advanceArunkumar Pichaimuthu, PMP

Re: Migrating from log4j 1 to log4j 2

Posted by Arunkumar <pm...@yahoo.com.INVALID>.
Thanks for the info Ismael. Is there any time line for the CR? Please let me know.
ThanksArunkumar Pichaimuthu, PMP 

    On Tuesday, November 14, 2017, 1:49:55 AM CST, Ismael Juma <is...@juma.me.uk> wrote:  
 
 The broker still has a direct dependency on log4j 1.x. There is a PR in
progress to remove this direct dependency.

Ismael

On Thu, Nov 9, 2017 at 10:17 PM, Arunkumar <pm...@yahoo.com.invalid>
wrote:

> Hi All
> We have a requirement to migrate log4J 1.x to log4j 2 for our kafka
> brokers using log4j bridge utility. According to Apache Docs the code must
> not call DOMConfigurator or PropertyConfigurator class, But when I dig into
> the code I see on Tools package and other packages they have used
> PropertyConfigurator. I just wanted to double check if any one has any
> insight on this. If above statement is true, it is not feasible to migrate,
> any one please confirm.
> Thanks in advanceArunkumar Pichaimuthu, PMP
  

Re: Migrating from log4j 1 to log4j 2

Posted by Ismael Juma <is...@juma.me.uk>.
The broker still has a direct dependency on log4j 1.x. There is a PR in
progress to remove this direct dependency.

Ismael

On Thu, Nov 9, 2017 at 10:17 PM, Arunkumar <pm...@yahoo.com.invalid>
wrote:

> Hi All
> We have a requirement to migrate log4J 1.x to log4j 2 for our kafka
> brokers using log4j bridge utility. According to Apache Docs the code must
> not call DOMConfigurator or PropertyConfigurator class, But when I dig into
> the code I see on Tools package and other packages they have used
> PropertyConfigurator. I just wanted to double check if any one has any
> insight on this. If above statement is true, it is not feasible to migrate,
> any one please confirm.
> Thanks in advanceArunkumar Pichaimuthu, PMP