Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-3020

Logger.catching(Throwable) does not document level it is logging at

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.14.0
    • 3.0.0, 2.14.1
    • Documentation
    • None

    Description

      The documentation of the method Logger.catching(Throwable) is not mentioning at which level it is logging at.
      It appears AbstractLogger is logging at level ERROR, but without it being explicitly mentioned, I think expecting it to be logged at DEBUG might also be a reasonable expectation.

      It would therefore be good to explicitly mention the log level in the documentation.


      As a side note: Personally I think the use case described by the catching documentation rather sounds like it should be logged at DEBUG:

      In other cases where simply logging the fact that an exception was swallowed somewhere

      To me that sounds like ignoring exceptions such as timeout exceptions and retrying an operation.

      Attachments

        Issue Links

          Activity

            People

              vy Volkan Yazici
              Marcono1234 Marcono1234
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: