Class Slf4jLogService
java.lang.Object
liquibase.logging.core.AbstractLogService
com.mattbertolini.liquibase.logging.slf4j.Slf4jLogService
- All Implemented Interfaces:
LogService,Plugin
Liquibase
LogService that creates an SLF4J-backed logger.-
Field Summary
Fields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTakes the given class argument and associates it with a SLF4J logger.intGets the logger priority for this logger.Methods inherited from class liquibase.logging.core.AbstractLogService
close, getFilter, setFilterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface liquibase.logging.LogService
close, getFilter, setFilter
-
Constructor Details
-
Slf4jLogService
public Slf4jLogService()Default constructor is needed for ServiceLoader to work.- See Also:
-
-
Method Details
-
getPriority
public int getPriority()Gets the logger priority for this logger. The priority is used by Liquibase to determine which LogService to use. The LogService with the highest priority will be selected. This implementation's priority is set to 5. Remove loggers with higher priority numbers if needed.- Specified by:
getPriorityin interfaceLogService- Returns:
- The priority integer. Defaults to 5 if no override is given.
-
getLog
Takes the given class argument and associates it with a SLF4J logger.- Specified by:
getLogin interfaceLogService- Parameters:
clazz- The class to create an SLF4J logger for
-