Uploaded image for project: 'Jetspeed 2'
  1. Jetspeed 2
  2. JS2-1254

Logging locations are hidden with JetspeedLoggerUtil or DefaultJetspeedLogger

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.2
    • Component/s: Container
    • Labels:
      None

      Description

      Jetspeed provides a neutral logger factory and interface for commons components such as JetspeedContainerServlet.
      Those common components cannot access slf4j library directly, so we have provided a wrapper implementation as a component.
      However, with those wrapper logger implementations, the logging locations such as class name and operation name are not recorded properly. Instead of the real logging locations, it prints the wrapper's operation locations.
      This can be fixed by using the Slf4j SPI interface, LocatonAwareLogger [1], in the wrapper classes,
      or by extending slf4j-ext's LoggerWrapper class [2].

      [1] http://www.slf4j.org/api/org/slf4j/spi/LocationAwareLogger.html
      [2] http://www.slf4j.org/api/org/slf4j/ext/LoggerWrapper.html

        Activity

        Hide
        woon_san Woonsan Ko added a comment -

        The Slf4j SPI interface, LocationAwareLogger, has been slightly changed since 1.6.x.
        So, the wrappers should care the changes as well.

        public void log(Marker marker, String fqcn, int level, String message, Throwable
        t);
        ==>
        public void log(Marker marker, String fqcn, int level, String message, Object[]
        argArray, Throwable t)

        Show
        woon_san Woonsan Ko added a comment - The Slf4j SPI interface, LocationAwareLogger, has been slightly changed since 1.6.x. So, the wrappers should care the changes as well. public void log(Marker marker, String fqcn, int level, String message, Throwable t); ==> public void log(Marker marker, String fqcn, int level, String message, Object[] argArray, Throwable t)
        Hide
        woon_san Woonsan Ko added a comment -

        Fixed.
        Jetspeed common logger is compatible with both slf4j-1.5.x and slf4j-1.6.x.

        Show
        woon_san Woonsan Ko added a comment - Fixed. Jetspeed common logger is compatible with both slf4j-1.5.x and slf4j-1.6.x.

          People

          • Assignee:
            woon_san Woonsan Ko
            Reporter:
            woon_san Woonsan Ko
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development