[ https://issues.apache.org/jira/browse/KAFKA-16924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luke Chen updated KAFKA-16924: ------------------------------ Description: In https://github.com/apache/kafka/pull/12148 , we removed log4jAppender dependency, and add testImplementation dependency for `slf4jlog4j` lib. However, we need this runtime dependency in tools module to output logs. ([ref](https://stackoverflow.com/a/21787813)) Adding this dependency back. Current output will be like this: {code:java} > bin/kafka-server-start.sh config/kraft/controller.properties SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.{code} was: In [https://github.com/apache/kafka/pull/12148] , we removed log4jAppender dependency, and "Add {{compileOnly}} dependency from {{tools}} to {{log4j}} (same approach as {{{}core{}}})." . However, we need this runtime dependency in tools module to output logs. Adding this dependency back. Current output will be like this: {code:java} > bin/kafka-server-start.sh config/kraft/controller.properties SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.{code} > No log output when running kafka > --------------------------------- > > Key: KAFKA-16924 > URL: https://issues.apache.org/jira/browse/KAFKA-16924 > Project: Kafka > Issue Type: Bug > Reporter: Luke Chen > Assignee: Luke Chen > Priority: Major > Fix For: 4.0.0 > > > In https://github.com/apache/kafka/pull/12148 , we removed log4jAppender > dependency, and add testImplementation dependency for `slf4jlog4j` lib. > However, we need this runtime dependency in tools module to output logs. > ([ref](https://stackoverflow.com/a/21787813)) Adding this dependency back. > > Current output will be like this: > {code:java} > > bin/kafka-server-start.sh config/kraft/controller.properties > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further > details.{code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)