Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-481

log4j-to-slf4j Null Throwable

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • None
    • None
    • log4j-to-slf4j-2.11.1

    Description

      In org.apache.logging.slf4j.SLF4JLogger.logMessage(...) Throwable t is passed to underlying SLF4J Logger implementation even if it is null:

      logger.debug(getMarker(marker), message.getFormattedMessage(), message.getParameters(), t)

      which causes the following method signature to apply, which is wrong:

      Logger.trace(Marker marker, String format, Object arg1, Object arg2)

       

      There should be a check in this method, if Throwable t argument is null, then call:

      Logger.trace(Marker marker, String format, Object arg)

       

      Attachments

        Activity

          People

            slf4j-dev SLF4J developers list
            Pryamostanov Anton
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: