Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
Description
It's known that:
logger.error("String {} with {} some {} arguments, object1, object2, object3, exception);
will correctly interpolate the three objects' object.toString() where the " {} " exist in the string.
However, this will produce unintuitive behavior:
logger.error("String {} with {} some {} arguments, object1, object2, exception);
Expected behavior: the string is interpolated properly, with the third argument being the result of exception.toString()
Actual behavior: the third " {} " literally prints out " {} ".
This is worse if you're trying to print multiple exceptions:
logger.error("Exception 1: {}, Exception 2: {}", exception1, exception2);
This will have the very unintuitive behavior of printing this, essentially leaving the "{}" in the string.
"Exception 1: {}, Exception 2: {}"