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

Some LogEvents may not carry a Throwable (Use Message.getThrowable() in log(Message) methods)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5, 2.6, 2.7
    • Fix Version/s: 2.8
    • Component/s: None
    • Labels:
      None

      Description

      All log(Message) methods should use Message.getThrowable(), e.g.

          public void debug(final Message msg) {
              logIfEnabled(FQCN, Level.DEBUG, null, msg, msg != null ? msg.getThrowable() : null);
          }
      

      instead of the current

          public void debug(final Message msg) {
              logIfEnabled(FQCN, Level.DEBUG, null, msg, null);
          }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                garydgregory Gary Gregory
                Reporter:
                huxi Joern Huxhorn
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: