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

Provide a logging methods with only a Throwable object as parameters

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • 2.0-beta1
    • API
    • None

    Description

      Provide logging methods with only a Throwable object as a single parameter:

      info(Throwable e)
      error(Throwable e)
      ...

      The throwable objects contain a message themself and a stacktrace. So most of the times its pointless to log additional message. So in order to log them now you have to log an empty message and the throwable object:

      logger.error("", e);

      Which is obviously ugly and pointless when there is no reason not to have method like:

      logger.error(e);

      that should log both the message and the stacktrace.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ivan.anev Ivan Anev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: