vert-x3 / vertx-zookeeper

Zookeeper based cluster manager implementation
Other
73 stars 67 forks source link

Unable disable ZooKeeper debug logs in vertx-zookeeper library #145

Closed jeffreytkj closed 1 year ago

jeffreytkj commented 1 year ago

Issue Description I would like to disable the debug logs generated by the vertx-zookeeper library in my Vert.x application. Currently, I am seeing verbose ZooKeeper debug logs, which are cluttering the log output and making it harder to identify relevant information.

Environment

Steps to Reproduce

  1. Add vertx-zookeeper as a dependency in your Vert.x project.
  2. Create a logging.properties file in the root of your application's classpath.
  3. Add the following content to the logging.properties file: org.apache.zookeeper.level=INFO
  4. Save the file and restart your application.
  5. Start the application and observe the log output, including the verbose ZooKeeper debug logs.

Expected Behavior I expect to have control over the log level of the vertx-zookeeper library, specifically to disable the debug logs.

Additional Information I have already tried modifying the logging.properties file with the suggested configuration, but the debug logs are still appearing. I have verified that the logging.properties file is correctly placed in the classpath and is being read by the application.

tsegismont commented 1 year ago

You need to add log4j2 dependencies

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>2.17.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>2.17.1</version>
    </dependency>

And also to name the file log4j2.properties