Package org.slf4j.jul

Class JDK14LoggerAdapter

  • All Implemented Interfaces:
    java.io.Serializable, org.slf4j.Logger, org.slf4j.spi.LocationAwareLogger

    public final class JDK14LoggerAdapter
    extends org.slf4j.helpers.LegacyAbstractLogger
    implements org.slf4j.spi.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:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.slf4j.helpers.AbstractLogger

        name
      • Fields inherited from interface org.slf4j.spi.LocationAwareLogger

        DEBUG_INT, ERROR_INT, INFO_INT, TRACE_INT, WARN_INT
      • Fields inherited from interface org.slf4j.Logger

        ROOT_LOGGER_NAME
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String getFullyQualifiedCallerName()  
      protected void handleNormalizedLoggingCall​(org.slf4j.event.Level level, org.slf4j.Marker marker, java.lang.String msg, java.lang.Object[] args, java.lang.Throwable throwable)
      Log the message at the specified level with the specified throwable if any.
      boolean isDebugEnabled()
      Is this logger instance enabled for the FINE level?
      boolean isErrorEnabled()
      Is this logger instance enabled for level SEVERE?
      boolean isInfoEnabled()
      Is this logger instance enabled for the INFO level?
      boolean isTraceEnabled()
      Is this logger instance enabled for the FINEST level?
      boolean isWarnEnabled()
      Is this logger instance enabled for the WARNING level?
      void log​(org.slf4j.event.LoggingEvent event)  
      void log​(org.slf4j.Marker marker, java.lang.String callerFQCN, int slf4jLevelInt, java.lang.String message, java.lang.Object[] arguments, java.lang.Throwable throwable)  
      • Methods inherited from class org.slf4j.helpers.LegacyAbstractLogger

        isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled
      • Methods inherited from class org.slf4j.helpers.AbstractLogger

        debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, error, error, error, error, error, error, error, error, error, error, getName, info, info, info, info, info, info, info, info, info, info, readResolve, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.slf4j.Logger

        atDebug, atError, atInfo, atLevel, atTrace, atWarn, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, error, error, error, error, error, error, error, error, error, error, getName, info, info, info, info, info, info, info, info, info, info, isDebugEnabled, isEnabledForLevel, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, makeLoggingEventBuilder, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn
    • Method Detail

      • isTraceEnabled

        public boolean isTraceEnabled()
        Is this logger instance enabled for the FINEST level?
        Specified by:
        isTraceEnabled in interface org.slf4j.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 org.slf4j.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 org.slf4j.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 org.slf4j.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 org.slf4j.Logger
        Returns:
        True if this Logger is enabled for level SEVERE, false otherwise.
      • handleNormalizedLoggingCall

        protected void handleNormalizedLoggingCall​(org.slf4j.event.Level level,
                                                   org.slf4j.Marker marker,
                                                   java.lang.String msg,
                                                   java.lang.Object[] args,
                                                   java.lang.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 org.slf4j.helpers.AbstractLogger
      • getFullyQualifiedCallerName

        protected java.lang.String getFullyQualifiedCallerName()
        Specified by:
        getFullyQualifiedCallerName in class org.slf4j.helpers.AbstractLogger
      • log

        public void log​(org.slf4j.Marker marker,
                        java.lang.String callerFQCN,
                        int slf4jLevelInt,
                        java.lang.String message,
                        java.lang.Object[] arguments,
                        java.lang.Throwable throwable)
        Specified by:
        log in interface org.slf4j.spi.LocationAwareLogger
      • log

        public void log​(org.slf4j.event.LoggingEvent event)
        Since:
        1.7.15