Class LogbackLoggingSystem

java.lang.Object
io.micronaut.logging.impl.LogbackLoggingSystem
All Implemented Interfaces:
LoggingSystem

@Singleton @Requires(classes=ch.qos.logback.classic.LoggerContext.class) @Internal public final class LogbackLoggingSystem extends Object implements LoggingSystem
An implementation of LoggingSystem that works with logback.
Since:
1.3.0
Author:
Matthew Moss
  • Constructor Details

    • LogbackLoggingSystem

      public LogbackLoggingSystem(@Nullable @Property(name="logback.configurationFile") @Nullable String logbackExternalConfigLocation, @Nullable @Property(name="logger.config") @Nullable 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 Details

    • setLogLevel

      public void setLogLevel(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