KevinZTW commented on code in PR #15473: URL: https://github.com/apache/kafka/pull/15473#discussion_r1512665815
########## connect/runtime/src/main/java/org/apache/kafka/connect/runtime/ConnectMetrics.java: ########## @@ -431,6 +432,7 @@ public interface LiteralSupplier<T> { * @param args the arguments */ public static void main(String[] args) { + LogManager.shutdown(); Review Comment: In the current design, the way we generate our documentation file is executing the `main()` in above 434 lines and took everything from the stdout as a file. ```gradle task genConsumerMetricsDocs(type: JavaExec) { classpath = sourceSets.test.runtimeClasspath mainClass = 'org.apache.kafka.clients.consumer.internals.ConsumerMetrics' if( !generatedDocsDir.exists() ) { generatedDocsDir.mkdirs() } standardOutput = new File(generatedDocsDir, "consumer_metrics.html").newOutputStream() } ``` This caused all log information also be added into our docs as you can see here https://kafka.apache.org/documentation.html#connect_monitoring ![image](https://github.com/apache/kafka/assets/38662781/d9ec6023-6b0c-4165-b6f8-59cb039669d8) -- 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