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

Logging trait obfuscates call site information

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.8.2.0
    • None
    • core
    • None

    Description

      Using a logging trait, as many components in the codebase do, destroys call site information in logging message making debugging certain kinds of failures annoying in production systems. Most messages end up look like:

      2015-06-18 07:41:11,550 (kafka-request-handler-0) [WARN - kafka.utils.Logging$class.warn(Logging.scala:83)] Partition [events,1] on broker 1: No checkpointed highwatermark is found for partition [events,1]
      

      I think the mental overhead of issuing the standard incantation of private static final Logger logger = LoggerFactory.get(Foo.class) (or the even shorter Scala equivalent) for each class is outweighed by the operational overhead of mapping strings back to their original call sites. This is an easy win improve the traceability of complex failures in production deployments.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              esammer Eric Sammer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: