Class SLF4JLogger
- java.lang.Object
-
- org.eclipse.persistence.logging.AbstractSessionLog
-
- org.eclipse.persistence.logging.slf4j.SLF4JLogger
-
- All Implemented Interfaces:
Cloneable,SessionLog
public class SLF4JLogger extends AbstractSessionLog
EclipseLink logger bridge over SLF4J.
-
-
Field Summary
Fields Modifier and Type Field Description static StringECLIPSELINK_NAMESPACEThe 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
Constructors Constructor Description SLF4JLogger()Creates an instance of EclipseLink logger bridge over SLF4J
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetLevel()Get the logging level for the default logging category.intgetLevel(String categoryName)Get the logging level for the specified logging category.voidlog(SessionLogEntry logEntry)voidsetLevel(int level)Set the logging level for the default logging category.voidsetLevel(int level, String categoryName)Set 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.booleanshouldLog(int level, String categoryName)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 Detail
-
ECLIPSELINK_NAMESPACE
public static final String ECLIPSELINK_NAMESPACE
The default session name in case there is session name is missing.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
public int getLevel(String categoryName)
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
public void setLevel(int level, String categoryName)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
public boolean shouldLog(int level, String categoryName)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
public void log(SessionLogEntry logEntry)
- Specified by:
login interfaceSessionLog- Specified by:
login classAbstractSessionLog
-
-