You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by js...@apache.org on 2022/10/14 18:29:27 UTC
[kafka] branch 3.3 updated: MINOR; Add kraft controller log level in log4j prop (#12707)
This is an automated email from the ASF dual-hosted git repository.
jsancio pushed a commit to branch 3.3
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/3.3 by this push:
new 5aaf0685a1f MINOR; Add kraft controller log level in log4j prop (#12707)
5aaf0685a1f is described below
commit 5aaf0685a1f186a1e4a79c072fb2d3cfc98ba85c
Author: Luke Chen <sh...@gmail.com>
AuthorDate: Sat Oct 15 02:27:31 2022 +0800
MINOR; Add kraft controller log level in log4j prop (#12707)
Add KRaft controller log level entry in log4j.properties, otherwise, the controller.log is empty in KRaft mode.
Reviewers: José Armando García Sancio <js...@apache.org>, Ismael Juma <is...@juma.me.uk>
---
config/log4j.properties | 5 +++++
.../main/scala/kafka/server/BrokerToControllerChannelManager.scala | 2 +-
core/src/main/scala/kafka/server/KafkaRaftServer.scala | 2 --
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/config/log4j.properties b/config/log4j.properties
index 4cbce9d1042..4dbdd83f83b 100644
--- a/config/log4j.properties
+++ b/config/log4j.properties
@@ -76,6 +76,11 @@ log4j.additivity.kafka.request.logger=false
log4j.logger.kafka.network.RequestChannel$=WARN, requestAppender
log4j.additivity.kafka.network.RequestChannel$=false
+# Change the line below to adjust KRaft mode controller logging
+log4j.logger.org.apache.kafka.controller=INFO, controllerAppender
+log4j.additivity.org.apache.kafka.controller=false
+
+# Change the line below to adjust ZK mode controller logging
log4j.logger.kafka.controller=TRACE, controllerAppender
log4j.additivity.kafka.controller=false
diff --git a/core/src/main/scala/kafka/server/BrokerToControllerChannelManager.scala b/core/src/main/scala/kafka/server/BrokerToControllerChannelManager.scala
index a4879798342..99e86722f2f 100644
--- a/core/src/main/scala/kafka/server/BrokerToControllerChannelManager.scala
+++ b/core/src/main/scala/kafka/server/BrokerToControllerChannelManager.scala
@@ -370,7 +370,7 @@ class BrokerToControllerRequestThread(
debug("Controller isn't cached, looking for local metadata changes")
controllerNodeProvider.get() match {
case Some(controllerNode) =>
- info(s"Recorded new controller, from now on will use broker $controllerNode")
+ info(s"Recorded new controller, from now on will use node $controllerNode")
updateControllerAddress(controllerNode)
metadataUpdater.setNodes(Seq(controllerNode).asJava)
case None =>
diff --git a/core/src/main/scala/kafka/server/KafkaRaftServer.scala b/core/src/main/scala/kafka/server/KafkaRaftServer.scala
index 63f77d1a43d..84ea10da57f 100644
--- a/core/src/main/scala/kafka/server/KafkaRaftServer.scala
+++ b/core/src/main/scala/kafka/server/KafkaRaftServer.scala
@@ -47,8 +47,6 @@ import scala.jdk.CollectionConverters._
* constructing the controller and/or broker based on the `process.roles`
* configuration and for managing their basic lifecycle (startup and shutdown).
*
- * Note that this server is a work in progress and we are releasing it as
- * early access in 2.8.0.
*/
class KafkaRaftServer(
config: KafkaConfig,