Package io.micronaut.logging.impl
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 java.lang.Object implements LoggingSystem
An implementation ofLoggingSystemthat works with logback.- Since:
- 1.3.0
-
-
Constructor Summary
Constructors Constructor Description LogbackLoggingSystem(java.lang.String logbackXmlLocation)Deprecated.UseLogbackLoggingSystem(String, String)insteadLogbackLoggingSystem(java.lang.String logbackExternalConfigLocation, java.lang.String logbackXmlLocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrefresh()Refreshes Logging System with the goal of cleaning its internal caches.voidsetLogLevel(java.lang.String name, LogLevel level)Set the log level for the logger found by name (or created if not found).
-
-
-
Constructor Detail
-
LogbackLoggingSystem
@Deprecated public LogbackLoggingSystem(@Nullable @Property(name="logger.config") java.lang.String logbackXmlLocation)Deprecated.UseLogbackLoggingSystem(String, String)instead- 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 propertieslogbackXmlLocation- 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:LoggingSystemSet the log level for the logger found by name (or created if not found).- Specified by:
setLogLevelin interfaceLoggingSystem- Parameters:
name- the logger namelevel- the log level to set on the named logger
-
refresh
public void refresh()
Description copied from interface:LoggingSystemRefreshes Logging System with the goal of cleaning its internal caches.- Specified by:
refreshin interfaceLoggingSystem
-
-