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

Update JavaDoc on Logger to explicitly state desired functionality.

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • Core API
    • 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

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

            Dates

              Created:
              Updated: