You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Chris Nauroth (Jira)" <ji...@apache.org> on 2022/11/29 19:36:00 UTC

[jira] [Commented] (ZOOKEEPER-4637) Apache Zookeeper 3.7.1 is not allowing to change PatternLayout to manipulate the logs format

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-4637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17640911#comment-17640911 ] 

Chris Nauroth commented on ZOOKEEPER-4637:
------------------------------------------

Hello [~TheDevarshiShah].

> Apache Zookeeper 3.7.0 was using Log4j2 2.17.2

Apache ZooKeeper never migrated to Log4J 2. Instead, the community chose to migrate to Reload4J. In version 3.7.0, it was still using Log4J 1.2.17:

https://github.com/apache/zookeeper/blob/release-3.7.0/pom.xml#L436

Were you using a custom distro that swapped in Log4J 2? If not, then this is more likely to be caused by some difference between Log4J 1 and Reload4J.

Can you please share more details about the problem you're seeing after upgrading to ZooKeeper 3.7.1? Are you seeing an error message, or is the output not the expected format?

> Apache Zookeeper 3.7.1 is not allowing to change PatternLayout to manipulate the logs format
> --------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-4637
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4637
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.7.1
>            Reporter: Devarshi Shah
>            Priority: Major
>
> We are using the PatternLayout of log4j.properties to get the logs in custom format in our Apache Zookeeper cluster:
> {code:java}
> appender.console.layout.pattern = {"timestamp": "%d{yyyy-MM-dd'T'HH:mm:ss.SSSZ}", "severity": "%p{lowerCase=true}", "message": "%m"}%n {code}
> Apache Zookeeper 3.7.0 was using Log4j2 2.17.2; though, the Apache Zookeeper 3.7.1 is using Reload4j 1.2.19 which is based on Log4j1 1.2.17. So for us, it's downgrade from Log4j 2.17.2 to 1.2.17. We've tried to modify the PatternLayout accordingly, but it didn't work.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)