frankvicky commented on code in PR #17382:
URL: https://github.com/apache/kafka/pull/17382#discussion_r1792709057


##########
core/src/test/scala/unit/kafka/utils/TestUtils.scala:
##########
@@ -1865,4 +1866,17 @@ object TestUtils extends Logging {
       timedOut.set(true)
     }
   }
+
+  /**
+   * Resets the logging configuration after the test.
+   */
+  def resetLogging[T] = {
+    org.apache.log4j.LogManager.resetConfiguration()
+    val stream = this.getClass.getResourceAsStream("/log4j.properties")
+    try {
+      PropertyConfigurator.configure(stream)
+    } finally {
+      stream.close()
+    }

Review Comment:
   I wonder we should fix the issue with this workaround at this moment since 
we are upgrading to log4j2 which providing a convenient way to reload 
configuration.
   
   
https://logging.apache.org/log4j/2.x/javadoc/log4j-core/org/apache/logging/log4j/core/config/Configurator.html#reconfigure()



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to