Class LogObserveProvider

java.lang.Object
io.helidon.nima.observe.log.LogObserveProvider
All Implemented Interfaces:
ObserveProvider

public class LogObserveProvider extends Object implements ObserveProvider
ServiceLoader provider implementation for logging observe provider.

Java Util Logging uses weak references to loggers (and does not support adding level configuration to LogManager at runtime), so changing a log level for a logger may be temporary (in case a garbage collector runs and the reference is not kept anywhere). In Helidon, most loggers are referenced for the duration of the application, so this should not impact Helidon components.

  • Constructor Details

    • LogObserveProvider

      public LogObserveProvider()
  • Method Details

    • configKey

      public String configKey()
      Description copied from interface: ObserveProvider
      Configuration key of this provider. The following keys are reserved by Observe support:
      • enabled - enable/disable the service
      • endpoint - endpoint, if starts with / then absolute, otherwise relative to observe endpoint
      Specified by:
      configKey in interface ObserveProvider
      Returns:
      configuration key of this provider (such as health)
    • defaultEndpoint

      public String defaultEndpoint()
      Description copied from interface: ObserveProvider
      Default endpoint of this provider. To define a relative path, do not include forward slash (such as health would resolve into /observe/health).
      Specified by:
      defaultEndpoint in interface ObserveProvider
      Returns:
      default endpoint under /observe
    • register

      public void register(Config config, String componentPath, HttpRouting.Builder routing)
      Description copied from interface: ObserveProvider
      Register the provider's services and handlers to the routing builder. The component MUST honor the provided component path.
      Specified by:
      register in interface ObserveProvider
      Parameters:
      config - configuration of this provider
      componentPath - component path to register under (such as /observe/health, based on configured endpoint and ObserveProvider.defaultEndpoint())
      routing - routing builder