[slf4j-dev] [JIRA] (SLF4J-458) More Multiple Argument Variants for Debug and Trace Statements

QOS.CH (JIRA) noreply-jira at qos.ch
Mon Apr 15 15:29:00 CEST 2019


DAVID A MOLLITOR created SLF4J-458:
--------------------------------------

             Summary: More Multiple Argument Variants for Debug and Trace Statements
                 Key: SLF4J-458
                 URL: https://jira.qos.ch/browse/SLF4J-458
             Project: SLF4J
          Issue Type: Improvement
         Environment: [https://www.slf4j.org/faq.html#logging_performance]

{quote}
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.
{quote}

Please create a 3 and 4 argument variant for {{debug}} and {{trace}} statements.
            Reporter: DAVID A MOLLITOR
            Assignee: SLF4J developers list






--
This message was sent by Atlassian JIRA
(v7.3.1#73012)


More information about the slf4j-dev mailing list