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 Details

  • 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 interface SessionLog
      Overrides:
      getLevel in class AbstractSessionLog
      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:
      getLevel in interface SessionLog
      Overrides:
      getLevel in class AbstractSessionLog
      Parameters:
      categoryName - The String 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 interface SessionLog
      Overrides:
      setLevel in class AbstractSessionLog
      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:
      setLevel in interface SessionLog
      Overrides:
      setLevel in class AbstractSessionLog
      Parameters:
      level - The logging level to be set.
      categoryName - The String 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 interface SessionLog
      Overrides:
      shouldLog in class AbstractSessionLog
      Parameters:
      level - Message logging level.
      Returns:
      Value of true if the given message logging level will be logged or false otherwise.
    • 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:
      shouldLog in interface SessionLog
      Overrides:
      shouldLog in class AbstractSessionLog
      Parameters:
      level - Message logging level.
      categoryName - The String representation of an EclipseLink logging category.
      Returns:
      Value of true if the given message logging level will be logged or false otherwise.
    • log

      public void log(SessionLogEntry logEntry)
      Description copied from class: AbstractSessionLog
      PUBLIC:

      Log a SessionLogEntry

      Specified by:
      log in interface SessionLog
      Specified by:
      log in class AbstractSessionLog
      Parameters:
      logEntry - SessionLogEntry that holds all the information for an EclipseLink logging event