Interface LogRouter

All Superinterfaces:
AutoCloseable, LogLifecycle
All Known Subinterfaces:
LogRouter.RootRouter, LogRouter.Router
All Known Implementing Classes:
LogRouter.AbstractRouter

public sealed interface LogRouter extends LogLifecycle permits LogRouter.RootRouter, LogRouter.Router
Routes messages to a publisher by providing a LogRouter.Route from a logger name and level.
  • Method Details

    • route

      Finds a route.
      Parameters:
      loggerName - topic.
      level - level.
      Returns:
      route never null.
    • eventBuilder

      Creates (or reuses in the case of logging off) an event builder.
      Parameters:
      loggerName - logger name of the event.
      level - level that the event should be set to.
      Returns:
      builder.
      API Note
      using the builder is slightly slower and possibly more garbage (if the builder is not marked for escape analysis) than just manually checking LogRouter.Route.isEnabled() and constructing the event using the LogEvent static "of" factory methods.
    • global

      Global router which is always available.
      Returns:
      global root router.