Package liquibase.logging.core
Class JavaLogService
java.lang.Object
liquibase.logging.core.AbstractLogService
liquibase.logging.core.JavaLogService
- All Implemented Interfaces:
LogService
,Plugin
-
Field Summary
Fields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates a logger for logging from the given class.protected String
getLogName
(Class clazz) Because java.util.logging differentiates between the log name and the class/method logging, we can collapses the log names to a simpler/smaller set to allow configuration to rely on the class name less.int
static void
setFormatterOnHandler
(LogService logService, Handler handler) Set the formatter for the supplied handler if the supplied log service is a JavaLogService and that service specifies a custom formatter.void
Explicitly control the parent logger for allLogger
instances created.Methods inherited from class liquibase.logging.core.AbstractLogService
close, getFilter, setFilter
-
Constructor Details
-
JavaLogService
public JavaLogService()
-
-
Method Details
-
getPriority
public int getPriority() -
getLog
Description copied from interface:LogService
Creates a logger for logging from the given class. Unlike most logging systems, there is no exposed getLog(String) method in order to provide more consistency in how logs are named. -
getLogName
Because java.util.logging differentiates between the log name and the class/method logging, we can collapses the log names to a simpler/smaller set to allow configuration to rely on the class name less.
This implementation always returns the 2nd level liquibase package name for the class passed in OR from any liquibase interfaces/classes it implements. For example, allChange
classes will return a log name of "liquibase.change" no matter what class name or package name they have. -
getParent
-
setParent
Explicitly control the parent logger for allLogger
instances created. -
getCustomFormatter
-
setFormatterOnHandler
Set the formatter for the supplied handler if the supplied log service is a JavaLogService and that service specifies a custom formatter.
-