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 Object
implements LoggingSystem
An implementation of
LoggingSystem that works with logback.- Since:
- 1.3.0
- Author:
- Matthew Moss
-
Constructor Summary
ConstructorsConstructorDescriptionLogbackLoggingSystem(@Nullable String logbackExternalConfigLocation, @Nullable String logbackXmlLocation) -
Method Summary
Modifier and TypeMethodDescriptionvoidrefresh()Refreshes Logging System with the goal of cleaning its internal caches.voidsetLogLevel(String name, LogLevel level) Set the log level for the logger found by name (or created if not found).
-
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 propertieslogbackXmlLocation- The location of the logback configuration file set via micronaut properties- Since:
- 3.8.8
-
-
Method Details
-
setLogLevel
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
-