Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
Description
https://www.slf4j.org/faq.html#logging_performance
A two argument variant is also available. For example, you can write:
logger.debug("The new entry is {}. It replaces {}.", entry, oldEntry);
If three or more arguments need to be passed, you can make use of the Object... variant of the printing methods. For example, you can write:logger.debug("Value {} was inserted between {} and {}.", newVal, below, above);
This form incurs the hidden cost of construction of an Object[] (object array) which is usually very small. The one and two argument variants do not incur this hidden cost and exist solely for this reason (efficiency). The slf4j-api would be smaller/cleaner with only the Object... variant.
Please create a 3 and 4 argument variant for debug and trace statements.