Class DefaultLoggersManager

  • All Implemented Interfaces:
    LoggersManager<java.util.Map<java.lang.String,​java.lang.Object>>

    @Singleton
    @Requires(beans=LoggersEndpoint.class)
    public class DefaultLoggersManager
    extends java.lang.Object
    implements LoggersManager<java.util.Map<java.lang.String,​java.lang.Object>>
    Default implementation of LoggersManager.
    Since:
    1.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.reactivestreams.Publisher<java.util.Map<java.lang.String,​java.lang.Object>> getLogger​(ManagedLoggingSystem loggingSystem, java.lang.String name)
      Find (or create if not found) the named logger in the system.
      org.reactivestreams.Publisher<java.util.Map<java.lang.String,​java.lang.Object>> getLoggers​(ManagedLoggingSystem loggingSystem)
      Collect all existing loggers in the system.
      void setLogLevel​(ManagedLoggingSystem loggingSystem, @NotBlank java.lang.String name, io.micronaut.logging.LogLevel level)
      Set the log level for the named logger in the system.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultLoggersManager

        public DefaultLoggersManager()
    • Method Detail

      • getLoggers

        public org.reactivestreams.Publisher<java.util.Map<java.lang.String,​java.lang.Object>> getLoggers​(ManagedLoggingSystem loggingSystem)
        Description copied from interface: LoggersManager
        Collect all existing loggers in the system.
        Specified by:
        getLoggers in interface LoggersManager<java.util.Map<java.lang.String,​java.lang.Object>>
        Parameters:
        loggingSystem - The ManagedLoggingSystem in use
        Returns:
        A Publisher of T
      • getLogger

        public org.reactivestreams.Publisher<java.util.Map<java.lang.String,​java.lang.Object>> getLogger​(ManagedLoggingSystem loggingSystem,
                                                                                                               java.lang.String name)
        Description copied from interface: LoggersManager
        Find (or create if not found) the named logger in the system.
        Specified by:
        getLogger in interface LoggersManager<java.util.Map<java.lang.String,​java.lang.Object>>
        Parameters:
        loggingSystem - The ManagedLoggingSystem in use
        name - The name of the logger to find or create
        Returns:
        A Publisher of T
      • setLogLevel

        public void setLogLevel​(ManagedLoggingSystem loggingSystem,
                                @NotBlank
                                @NotBlank java.lang.String name,
                                @NotNull
                                io.micronaut.logging.LogLevel level)
        Description copied from interface: LoggersManager
        Set the log level for the named logger in the system.
        Specified by:
        setLogLevel in interface LoggersManager<java.util.Map<java.lang.String,​java.lang.Object>>
        Parameters:
        loggingSystem - The ManagedLoggingSystem in use
        name - The name of the logger to find or create
        level - The log level to configure