FrankYang0529 commented on PR #18370: URL: https://github.com/apache/kafka/pull/18370#issuecomment-2571485828
> could you please test log4j properties also? It should work with some deprecation warnings Yes, it works as well. 1. Set up `raft/config/kraft-log4j.properties`. ``` log4j.rootLogger=INFO, stderr log4j.appender.stderr=org.apache.log4j.ConsoleAppender log4j.appender.stderr.layout=org.apache.log4j.PatternLayout log4j.appender.stderr.layout.ConversionPattern=[%d] %p %m (%c)%n log4j.appender.stderr.Target=System.err log4j.logger.org.apache.kafka.raft=INFO log4j.logger.org.apache.kafka.snapshot=INFO ``` 2. Run `test-kraft-server-start.sh`. ``` > cd raft > KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:config/kraft-log4j.properties" bin/test-kraft-server-start.sh --config config/kraft.properties --replica-directory-id b8tRS7h4TJ2Vt43Dp85v2A -Dlog4j.configuration=file:config/kraft-log4j.properties DEPRECATED: A Log4j 1.x configuration file has been detected, which is no longer recommended. To use a Log4j 2.x configuration, please see https://logging.apache.org/log4j/2.x/migrate-from-log4j1.html#Log4j2ConfigurationFormat for details about Log4j configuration file migration. You can also use the $KAFKA_HOME/config/tools-log4j2.yaml file as a starting point. Make sure to remove the Log4j 1.x configuration after completing the migration. [2025-01-05 11:18:55,187] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$) [2025-01-05 11:18:55,272] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util) ... ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
