Package org.slf4j.jul

Class JDK14LoggerAdapter

All Implemented Interfaces:
Serializable, Logger, LocationAwareLogger

public final class JDK14LoggerAdapter extends LegacyAbstractLogger implements LocationAwareLogger
A wrapper over java.util.logging.Logger in conformity with the Logger interface. Note that the logging levels mentioned in this class refer to those defined in the java.util.logging package.
Author:
Ceki Gülcü, Peter Royal
See Also:
  • Method Details

    • isTraceEnabled

      public boolean isTraceEnabled()
      Is this logger instance enabled for the FINEST level?
      Specified by:
      isTraceEnabled in interface Logger
      Returns:
      True if this Logger is enabled for level FINEST, false otherwise.
    • isDebugEnabled

      public boolean isDebugEnabled()
      Is this logger instance enabled for the FINE level?
      Specified by:
      isDebugEnabled in interface Logger
      Returns:
      True if this Logger is enabled for level FINE, false otherwise.
    • isInfoEnabled

      public boolean isInfoEnabled()
      Is this logger instance enabled for the INFO level?
      Specified by:
      isInfoEnabled in interface Logger
      Returns:
      True if this Logger is enabled for the INFO level, false otherwise.
    • isWarnEnabled

      public boolean isWarnEnabled()
      Is this logger instance enabled for the WARNING level?
      Specified by:
      isWarnEnabled in interface Logger
      Returns:
      True if this Logger is enabled for the WARNING level, false otherwise.
    • isErrorEnabled

      public boolean isErrorEnabled()
      Is this logger instance enabled for level SEVERE?
      Specified by:
      isErrorEnabled in interface Logger
      Returns:
      True if this Logger is enabled for level SEVERE, false otherwise.
    • handleNormalizedLoggingCall

      protected void handleNormalizedLoggingCall(Level level, Marker marker, String msg, Object[] args, Throwable throwable)
      Log the message at the specified level with the specified throwable if any. This method creates a LogRecord and fills in caller date before calling this instance's JDK14 logger.
      Specified by:
      handleNormalizedLoggingCall in class AbstractLogger
      Parameters:
      level - the SLF4J level for this event
      marker - The marker to be used for this event, may be null.
      msg - The message pattern which will be parsed and formatted
      args - the array of arguments to be formatted, may be null
      throwable - The exception whose stack trace should be logged, may be null
    • getFullyQualifiedCallerName

      Specified by:
      getFullyQualifiedCallerName in class AbstractLogger
    • log

      public void log(Marker marker, String callerFQCN, int slf4jLevelInt, String message, Object[] arguments, Throwable throwable)
      Description copied from interface: LocationAwareLogger
      Printing method with support for location information.
      Specified by:
      log in interface LocationAwareLogger
      Parameters:
      marker - The marker to be used for this event, may be null.
      callerFQCN - The fully qualified class name of the logger instance, typically the logger class, logger bridge or a logger wrapper.
      slf4jLevelInt - One of the level integers defined in this interface
      message - The message for the log event
      throwable - Throwable associated with the log event, may be null.
    • log

      public void log(LoggingEvent event)
      Since:
      1.7.15