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
Modifier and TypeFieldDescriptionstatic final String
The 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, writer
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionint
getLevel()
Get the logging level for the default logging category.int
Get the logging level for the specified logging category.void
log
(SessionLogEntry logEntry) PUBLIC:void
setLevel
(int level) Set the logging level for the default logging category.void
Set the logging level for the specified logging category.boolean
shouldLog
(int level) Check if a message of the given level would actually be logged under logging level for the default logging category.boolean
Check 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:
getLevel
in interfaceSessionLog
- Overrides:
getLevel
in classAbstractSessionLog
- Returns:
- level Current logging level for default the default logging category.
-
getLevel
Get the logging level for the specified logging category.- Specified by:
getLevel
in interfaceSessionLog
- Overrides:
getLevel
in classAbstractSessionLog
- Parameters:
categoryName
- TheString
representation 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:
setLevel
in interfaceSessionLog
- Overrides:
setLevel
in classAbstractSessionLog
- Parameters:
level
- The logging level to be set.
-
setLevel
Set the logging level for the specified logging category.- Specified by:
setLevel
in interfaceSessionLog
- Overrides:
setLevel
in classAbstractSessionLog
- Parameters:
level
- The logging level to be set.categoryName
- TheString
representation 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:
shouldLog
in interfaceSessionLog
- Overrides:
shouldLog
in classAbstractSessionLog
- Parameters:
level
- Message logging level.- Returns:
- Value of
true
if the given message logging level will be logged orfalse
otherwise.
-
shouldLog
Check if a message of the given level would actually be logged under logging level for the specified logging category.- Specified by:
shouldLog
in interfaceSessionLog
- Overrides:
shouldLog
in classAbstractSessionLog
- Parameters:
level
- Message logging level.categoryName
- TheString
representation of an EclipseLink logging category.- Returns:
- Value of
true
if the given message logging level will be logged orfalse
otherwise.
-
log
Description copied from class:AbstractSessionLog
PUBLIC:Log a SessionLogEntry
- Specified by:
log
in interfaceSessionLog
- Specified by:
log
in classAbstractSessionLog
- Parameters:
logEntry
- SessionLogEntry that holds all the information for an EclipseLink logging event
-