Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-424

Logger does not implement LocationAwareLogger correctly with Wrapper class

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 1.0.0
    • None
    • None

    Description

      As shown in the attached project, we are logging using Logback classic through a wrapper class (LogHelper), with formatting specified by the %caller format specifier. Instead of showing the desired actual caller of the LogHelper.debug() method, the output shows as the caller, the caller of the caller of the logHelper.

      I'm expecting:
      2011-11-06 18:49:59,650 DEBUG [main] Caller+0 at org.javactivity.A.<init>(A.java:8)

      • Constructor of A
        2011-11-06 18:49:59,654 DEBUG [main] Caller+0 at org.javactivity.B.<init>(B.java:7)
      • Constructor of B

      Instead I get:
      2011-11-06 18:49:59,650 DEBUG [main] ?#?:?

      • Constructor of A
        2011-11-06 18:49:59,654 DEBUG [main] Caller+0 at org.javactivity.A.<init>(A.java:9)
      • Constructor of B

      Attachments

        Activity

          People

            logback-dev Logback dev list
            scohen@javactivity.org Steve Cohen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: