Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-10469

Respect logging hierarchy (KIP-676)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0
    • core
    • None

    Description

      Log4jController#loggers incorrectly uses the root logger's log level for any loggers which lack a configured log level of their own. This is incorrect because loggers without an explicit level inherit their level from their parent logger and this resolved level might be different from the root logger's level. This means that the levels reported from Admin.describeConfigs, which uses Log4jController#loggers are incorrect. This can be shown by using the default log4j.properties and describing a broker's loggers, it reports

      kafka.controller=TRACE
      kafka.controller.ControllerChannelManager=INFO
      kafka.controller.ControllerEventManager$ControllerEventThread=INFO
      kafka.controller.KafkaController=INFO
      kafka.controller.RequestSendThread=INFO
      kafka.controller.TopicDeletionManager=INFO
      kafka.controller.ZkPartitionStateMachine=INFO
      kafka.controller.ZkReplicaStateMachine=INFO
      

      The default log4j.properties does indeed set kafka.controller to TRACE, but it does not configure the others, so they're actually at TRACE not INFO as reported.

      Attachments

        Issue Links

          Activity

            People

              tombentley Tom Bentley
              tombentley Tom Bentley
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: