Class LogbackLoggingSystem

  • All Implemented Interfaces:
    LoggingSystem

    @Singleton
    @Requires(classes=ch.qos.logback.classic.LoggerContext.class)
    @Internal
    public final class LogbackLoggingSystem
    extends java.lang.Object
    implements LoggingSystem
    An implementation of LoggingSystem that works with logback.
    Since:
    1.3.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void refresh()
      Refreshes Logging System with the goal of cleaning its internal caches.
      void setLogLevel​(java.lang.String name, LogLevel level)
      Set the log level for the logger found by name (or created if not found).
      • Methods inherited from class java.lang.Object

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

      • LogbackLoggingSystem

        @Deprecated
        public LogbackLoggingSystem​(@Nullable @Property(name="logger.config")
                                    java.lang.String logbackXmlLocation)
        Deprecated.
        Parameters:
        logbackXmlLocation -
      • LogbackLoggingSystem

        @Inject
        public LogbackLoggingSystem​(@Nullable @Property(name="logback.configurationFile")
                                    java.lang.String logbackExternalConfigLocation,
                                    @Nullable @Property(name="logger.config")
                                    java.lang.String logbackXmlLocation)
        Parameters:
        logbackExternalConfigLocation - The location of the logback configuration file set via logback properties
        logbackXmlLocation - The location of the logback configuration file set via micronaut properties
        Since:
        3.8.8
    • Method Detail

      • setLogLevel

        public void setLogLevel​(java.lang.String name,
                                LogLevel level)
        Description copied from interface: LoggingSystem
        Set the log level for the logger found by name (or created if not found).
        Specified by:
        setLogLevel in interface LoggingSystem
        Parameters:
        name - the logger name
        level - the log level to set on the named logger
      • refresh

        public void refresh()
        Description copied from interface: LoggingSystem
        Refreshes Logging System with the goal of cleaning its internal caches.
        Specified by:
        refresh in interface LoggingSystem