Class SLF4JLogger
java.lang.Object
org.eclipse.persistence.logging.AbstractSessionLog
org.eclipse.persistence.logging.slf4j.SLF4JLogger
- All Implemented Interfaces:
Cloneable,SessionLog
EclipseLink logger bridge over SLF4J.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default session name in case there is session name is missing.Fields inherited from class org.eclipse.persistence.logging.AbstractSessionLog
CONFIG_PREFIX, CONNECTION_STRING, DATE_FORMAT_STR, dateFormat, defaultLog, FINE_PREFIX, FINER_PREFIX, FINEST_PREFIX, INFO_PREFIX, level, session, SEVERE_PREFIX, shouldDisplayData, shouldLogExceptionStackTrace, shouldPrintConnection, shouldPrintDate, shouldPrintSession, shouldPrintThread, THREAD_STRING, TOPLINK_PREFIX, WARNING_PREFIX, writerFields inherited from interface org.eclipse.persistence.logging.SessionLog
ALL, ALL_LABEL, CACHE, CONFIG, CONFIG_LABEL, CONNECTION, DBWS, DDL, DMS, EJB, EVENT, FINE, FINE_LABEL, FINER, FINER_LABEL, FINEST, FINEST_LABEL, INFO, INFO_LABEL, JPA, JPARS, loggerCatagories, METADATA, METAMODEL, MISC, MONITORING, MOXY, OFF, OFF_LABEL, PROCESSOR, PROPAGATION, PROPERTIES, QUERY, SEQUENCING, SERVER, SEVERE, SEVERE_LABEL, SQL, THREAD, TRANSACTION, WARNING, WARNING_LABEL, WEAVER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetLevel()Get the logging level for the default logging category.intGet the logging level for the specified logging category.voidlog(SessionLogEntry logEntry) PUBLIC:voidsetLevel(int level) Set the logging level for the default logging category.voidSet the logging level for the specified logging category.booleanshouldLog(int level) Check if a message of the given level would actually be logged under logging level for the default logging category.booleanCheck if a message of the given level would actually be logged under logging level for the specified logging category.Methods inherited from class org.eclipse.persistence.logging.AbstractSessionLog
clone, config, fine, finer, finest, formatMessage, getConnectionString, getDateFormat, getDateString, getDefaultLoggingLevel, getLevelString, getLog, getSession, getSessionString, getSupplementDetailString, getThreadString, getWriter, info, isOff, log, log, log, log, log, log, log, log, log, log, log, log, log, logThrowable, logThrowable, printPrefixString, setDateFormat, setLog, setSession, setShouldDisplayData, setShouldLogExceptionStackTrace, setShouldPrintConnection, setShouldPrintDate, setShouldPrintSession, setShouldPrintThread, setWriter, setWriter, severe, shouldDisplayData, shouldLogExceptionStackTrace, shouldPrintConnection, shouldPrintDate, shouldPrintSession, shouldPrintThread, throwing, translateLoggingLevelToString, translateStringToLoggingLevel, warning
-
Field Details
-
ECLIPSELINK_NAMESPACE
The default session name in case there is session name is missing.- See Also:
-
-
Constructor Details
-
SLF4JLogger
public SLF4JLogger()Creates an instance of EclipseLink logger bridge over SLF4J
-
-
Method Details
-
getLevel
public int getLevel()Get the logging level for the default logging category.- Specified by:
getLevelin interfaceSessionLog- Overrides:
getLevelin classAbstractSessionLog- Returns:
- level Current logging level for default the default logging category.
-
getLevel
Get the logging level for the specified logging category.- Specified by:
getLevelin interfaceSessionLog- Overrides:
getLevelin classAbstractSessionLog- Parameters:
categoryName- TheStringrepresentation of an EclipseLink logging category.- Returns:
- level Current logging level for default the default logging category.
-
setLevel
public void setLevel(int level) Set the logging level for the default logging category.- Specified by:
setLevelin interfaceSessionLog- Overrides:
setLevelin classAbstractSessionLog- Parameters:
level- The logging level to be set.
-
setLevel
Set the logging level for the specified logging category.- Specified by:
setLevelin interfaceSessionLog- Overrides:
setLevelin classAbstractSessionLog- Parameters:
level- The logging level to be set.categoryName- TheStringrepresentation of an EclipseLink logging category.
-
shouldLog
public boolean shouldLog(int level) Check if a message of the given level would actually be logged under logging level for the default logging category.- Specified by:
shouldLogin interfaceSessionLog- Overrides:
shouldLogin classAbstractSessionLog- Parameters:
level- Message logging level.- Returns:
- Value of
trueif the given message logging level will be logged orfalseotherwise.
-
shouldLog
Check if a message of the given level would actually be logged under logging level for the specified logging category.- Specified by:
shouldLogin interfaceSessionLog- Overrides:
shouldLogin classAbstractSessionLog- Parameters:
level- Message logging level.categoryName- TheStringrepresentation of an EclipseLink logging category.- Returns:
- Value of
trueif the given message logging level will be logged orfalseotherwise.
-
log
Description copied from class:AbstractSessionLogPUBLIC:Log a SessionLogEntry
- Specified by:
login interfaceSessionLog- Specified by:
login classAbstractSessionLog- Parameters:
logEntry- SessionLogEntry that holds all the information for an EclipseLink logging event
-