Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
NG alpha 1
-
None
-
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.