Flume
  1. Flume
  2. FLUME-818

PropertiesFileConfigurationProvider doesn't properly log exceptions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: NG alpha 1
    • Fix Version/s: NG alpha 2
    • Component/s: None
    • Labels:
      None

      Description

      In the exception handling logic of PropertiesFileConfigurationProvider, we accidentally get the incorrect overridden method in slf4j. This is a silly interface issue in slf4j. For reference, here's the cause.

      SLF4J allows parameterized log messages such as logger.error("Bad value: {}", value). It also has overridden methods that know how to print exceptions like logger.error("Caught the exception", ex). Note that the latter is not a parameter, but a separate argument. There's a method signature of all logging methods that looks like error(String, Object, Object) for a parameterized format string with two parameters. Unfortunately, this matches error("Received value {} but caught an exception", value, ex) and does NOT do what is intended. Boo hiss. I'm guilty of making this mistake endlessly.

        Activity

        Hide
        E. Sammer added a comment -

        Committed to branch flume-728.

        Show
        E. Sammer added a comment - Committed to branch flume-728.
        Hide
        Hudson added a comment -

        Integrated in flume-728 #54 (See https://builds.apache.org/job/flume-728/54/)
        FLUME-818: PropertiesFileConfigurationProvider doesn't properly log exceptions

        esammer : http://svn.apache.org/viewvc/?view=rev&rev=1187968
        Files :

        • /incubator/flume/branches/flume-728/flume-ng-node/src/main/java/org/apache/flume/conf/properties/PropertiesFileConfigurationProvider.java
        Show
        Hudson added a comment - Integrated in flume-728 #54 (See https://builds.apache.org/job/flume-728/54/ ) FLUME-818 : PropertiesFileConfigurationProvider doesn't properly log exceptions esammer : http://svn.apache.org/viewvc/?view=rev&rev=1187968 Files : /incubator/flume/branches/flume-728/flume-ng-node/src/main/java/org/apache/flume/conf/properties/PropertiesFileConfigurationProvider.java

          People

          • Assignee:
            E. Sammer
            Reporter:
            E. Sammer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development