Class ApplicationLoggerFlags

java.lang.Object
io.opentelemetry.javaagent.bootstrap.logging.ApplicationLoggerFlags

public final class ApplicationLoggerFlags extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Return true when the LoggerFactory instrumentation is allowed to install an application logger bridge.
    static boolean
    Return true when the LoggingApplicationListener instrumentation is allowed to install an application logger bridge.
    static void
    Disables the sfl4j LoggerFactory instrumentation; and instead enables the Spring Boot LoggingApplicationListener instrumentation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • setSpringBootApp

      public static void setSpringBootApp()
      Disables the sfl4j LoggerFactory instrumentation; and instead enables the Spring Boot LoggingApplicationListener instrumentation. In Spring Boot, an implementation of LoggingApplicationListener is responsible for initializing the logging library. Even though slf4j (and its LoggerFactory) is actually logged earlier, it is not usable until the LoggingApplicationListener finishes its initialization process.
    • bridgeLoggerFactory

      public static boolean bridgeLoggerFactory()
      Return true when the LoggerFactory instrumentation is allowed to install an application logger bridge. Will return true at most once.
    • bridgeSpringBootLogging

      public static boolean bridgeSpringBootLogging()
      Return true when the LoggingApplicationListener instrumentation is allowed to install an application logger bridge. Will return true at most once.