Class Log4jLogger_impl

java.lang.Object
org.apache.uima.util.impl.Logger_common_impl
org.apache.uima.util.impl.Log4jLogger_impl
All Implemented Interfaces:
Logger, org.slf4j.Logger

public class Log4jLogger_impl extends Logger_common_impl
UIMA Logging interface implementation for Log4j This version is for Log4j version 2, from Apache Built using version 2.8
  • Method Details

    • getInstance

      public static Logger getInstance(Class<?> component)
      Creates a new Log4jLogger instance for the specified source class
      Parameters:
      component - current source class
      Returns:
      Logger returns the JSR47Logger object for the specified class
    • getInstance

      public static Logger getInstance()
      Creates a new Log4jLogger instance with the default Log4j framework logger
      Returns:
      Logger returns the JSR47Logger object with the default Log4j framework logger
    • getLimitedLogger

      public Log4jLogger_impl getLimitedLogger(int aLimit)
      Parameters:
      aLimit - the limit
      Returns:
      a copy of the logger with the throttling limit set, or the same logger if no change
    • isLoggable

      public boolean isLoggable(Level level)
      Description copied from interface: Logger
      Checks if the argument level is greater or equal to the specified level
      Parameters:
      level - message level
      Returns:
      boolean - true if the argument level is greater or equal to the specified level
    • isLoggable

      public boolean isLoggable(Level level, org.slf4j.Marker marker)
      Description copied from interface: Logger
      Checks if this logger is enabled for this level and this marker
      Parameters:
      level - the level to test
      marker - null or the marker to test
      Returns:
      true if the level is greater or equal to the specified level and the marker matches
    • setLevel

      public void setLevel(Level level)
      Description copied from interface: Logger
      Sets the level of messages that will be logged by this logger. Note that if you call UIMAFramework.getLogger().setLevel(level), this will only change the logging level for messages produced by the UIMA framework. It will NOT change the logging level for messages produced by annotators. To change the logging level for an annotator, use UIMAFramework.getLogger(YourAnnotatorClass.class).setLevel(level).

      If you need more flexibility it configuring the logger, consider using the standard Java logger properties file or the java.util.logging APIs.

      Parameters:
      level - message level
    • log

      public void log(org.slf4j.Marker m, String aFqcn, Level level, String message, Object[] args, Throwable thrown)
      Description copied from class: Logger_common_impl
      The main log call implemented by subclasses
      Specified by:
      log in class Logger_common_impl
      Parameters:
      m - the marker
      aFqcn - the fully qualified class name of the top-most logging class used to filter the stack trace to get the caller class / method info
      level - the UIMA level
      message - -
      args - - arguments to be substituted into the message
      thrown - - can be null
    • log

      public void log(org.slf4j.Marker m, String aFqcn, Level level, String message, Throwable thrown)
      Description copied from class: Logger_common_impl
      The version of the main log call implemented by subclasses that skips the substitution because it already was done by rb()
      Specified by:
      log in class Logger_common_impl
      Parameters:
      m - the marker
      aFqcn - the fully qualified class name of the top-most logging class used to filter the stack trace to get the caller class / method info
      level - the UIMA level
      message - -
      thrown - - can be null
    • log2

      public void log2(org.slf4j.Marker m, String aFqcn, Level level, String message, Object[] args, Throwable thrown)
      Description copied from class: Logger_common_impl
      The version of the main log call implemented by subclasses that uses {}, not {n} as the substitutable syntax. This syntax is used by log4j, slf4j, and others. But not used by uimaj logger basic syntax, or Java Util Logger. This version is called by all new logging statments that don't need to be backwards compatible. e.g. logger.info, logger.error, logger.warn, etc.
      Specified by:
      log2 in class Logger_common_impl
      Parameters:
      m - the marker
      aFqcn - the fully qualified class name of the top-most logging class used to filter the stack trace to get the caller class / method info
      level - the UIMA level
      message - -
      args - - arguments to be substituted into the message
      thrown - - can be null
    • getName

      public String getName()
    • isDebugEnabled

      public boolean isDebugEnabled()
    • isDebugEnabled

      public boolean isDebugEnabled(org.slf4j.Marker arg0)
    • isErrorEnabled

      public boolean isErrorEnabled()
    • isErrorEnabled

      public boolean isErrorEnabled(org.slf4j.Marker arg0)
    • isInfoEnabled

      public boolean isInfoEnabled()
    • isInfoEnabled

      public boolean isInfoEnabled(org.slf4j.Marker arg0)
    • isTraceEnabled

      public boolean isTraceEnabled()
    • isTraceEnabled

      public boolean isTraceEnabled(org.slf4j.Marker arg0)
    • isWarnEnabled

      public boolean isWarnEnabled()
    • isWarnEnabled

      public boolean isWarnEnabled(org.slf4j.Marker arg0)