Class Slf4jLogService
- java.lang.Object
-
- liquibase.logging.core.AbstractLogService
-
- com.mattbertolini.liquibase.logging.slf4j.Slf4jLogService
-
- All Implemented Interfaces:
liquibase.logging.LogService,liquibase.plugin.Plugin
public class Slf4jLogService extends liquibase.logging.core.AbstractLogServiceLiquibaseLogServicethat creates an SLF4J-backed logger.
-
-
Constructor Summary
Constructors Constructor Description Slf4jLogService()Default constructor is needed for ServiceLoader to work.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description liquibase.logging.LoggergetLog(java.lang.Class clazz)Takes the given class argument and associates it with a SLF4J logger.intgetPriority()Gets the logger priority for this logger.
-
-
-
Method Detail
-
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.- Returns:
- The priority integer. Defaults to 5 if no override is given.
-
getLog
public liquibase.logging.Logger getLog(java.lang.Class clazz)
Takes the given class argument and associates it with a SLF4J logger.- Parameters:
clazz- The class to create an SLF4J logger for
-
-