Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1757

Logging: exceptions are not logged correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 3.4.2, 3.5
    • None
    • None

      When calling

      log.error("failure: %s", new NullPointerException("booom"));
      

      , the stack trace of the exception is not shown immediately following the error string:

      704 [ERROR] jgroups: failure: %s
      java.lang.NullPointerException: booom
              at org.jgroups.tests.bla4.main(bla4.java:14) [classes/:?]
      

      Invoking toString() on the exception works, but in some cases, we want to be able to see the stack trace.
      Investigate how to show the stack trace on all (currently) 3 loggers (JDK, log4j and log4j2).

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: