java.lang.Object
org.eclipse.persistence.jpa.rs.util.JPARSLogger

public class JPARSLogger extends Object
Logger for EclipseLink JPA-RS related functionality. Publishes messages under the SessionLog.JPARS category.
  • Field Details

    • DEFAULT_LOGGER

      public static final JPARSLogger DEFAULT_LOGGER
  • Constructor Details

    • JPARSLogger

      public JPARSLogger(SessionLog sessionLog)
  • Method Details

    • setSessionLog

      public void setSessionLog(SessionLog sessionLog)
    • entering

      public void entering(String sourceClass, String sourceMethod, String sessionId, Object[] params)
      Entering
      Parameters:
      sourceClass - the source class
      sourceMethod - the source method
      sessionId - the identifier of the session that generated the log entry or null when no session is available
      params - an array of parameters associated with the log message
    • entering

      public void entering(String sourceClass, String sourceMethod, String sessionId, InputStream in)
      Entering
      Parameters:
      sourceClass - the source class
      sourceMethod - the source method
      sessionId - the identifier of the session that generated the log entry or null when no session is available
      in - the input stream
    • exiting

      public void exiting(String sourceClass, String sourceMethod, String sessionId, Object[] params)
      Exiting
      Parameters:
      sourceClass - the source class
      sourceMethod - the source method
      sessionId - the identifier of the session that generated the log entry or null when no session is available
      params - an array of parameters associated with the log message
    • exiting

      public void exiting(String sourceClass, String sourceMethod, String sessionId, PersistenceContext context, Object object, MediaType mediaType)
      Exiting
      Parameters:
      sourceClass - the source class
      sourceMethod - the source method
      sessionId - the identifier of the session that generated the log entry or null when no session is available
      context - the context
      object - the object
      mediaType - the media type
    • finest

      public void finest(String sessionId, String message, Object[] params)
      Finest
      Parameters:
      sessionId - the identifier of the session that generated the log entry or null when no session is available
      message - the message
      params - parameters
    • fine

      public void fine(String sessionId, String message, Object[] params)
      Fine
      Parameters:
      sessionId - the identifier of the session that generated the log entry or null when no session is available
      message - the message
      params - parameters
    • warning

      public void warning(String sessionId, String message, Object[] params)
      Warning
      Parameters:
      sessionId - the identifier of the session that generated the log entry or null when no session is available
      message - the message
      params - parameters
    • error

      public void error(String sessionId, String message, Object[] params)
      Error
      Parameters:
      sessionId - the identifier of the session that generated the log entry or null when no session is available
      message - the message
      params - parameters
    • exception

      public void exception(String sessionId, String message, Object[] params, Throwable exc)
      Exception
      Parameters:
      sessionId - the identifier of the session that generated the log entry or null when no session is available
      message - the message
      params - parameters
      exc - the throwable
    • setLogLevel

      public void setLogLevel(int level)
      Sets the log level
      Parameters:
      level - the new log level
    • isLoggableFinest

      public boolean isLoggableFinest()
      Returns:
      true if log level is set to SessionLog.FINEST