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

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 2.0-beta1
    • Component/s: API
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: