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

Update JavaDoc on Logger to explicitly state desired functionality.

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core API
    • Labels:
      None

      Description

      In slf4j-api/src/main/java/org/slf4j/Logger.java it is not specified in the JavaDoc that the last parameter of the argument array for string templates is expected to be treated differently if it extends Throwable.

      Pull request that addresses this issue:

      https://github.com/qos-ch/slf4j/pull/185

       

      JavaDoc on the interface should explicitly state that if the last element of the array extends Throwable, it will not be used to template the string, and will be "the exception (throwable) to log".

       

      Documenting this expected functionality in docs outside of the JavaDoc is fine, but it should explicitly be stated in the interface contract if implementations are expected to do that.

        Attachments

          Activity

            People

            • Assignee:
              slf4j-dev SLF4J developers list
              Reporter:
              aglassman Andrew Glassman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: