org.apache.uima.util.impl

## Class JSR47Logger_impl

- java.lang.Object
- - org.apache.uima.util.impl.Logger_common_impl
  - - org.apache.uima.util.impl.JSR47Logger_impl

- All Implemented Interfaces:
    org.slf4j.Logger

      public class JSR47Logger_impl
      extends Logger_common_impl

  UIMA Logging interface implementation for Java Logging Toolkit JSR-47 (JDK 1.4) JUL Ignores Markers and MDC (not supported in the JUL)

- - ### Field Summary

    - ### Fields inherited from class org.apache.uima.util.impl.Logger_common_impl

      `EMPTY_STACK_TRACE_INFO, EXCEPTION_MESSAGE, fqcn, fqcnCmn, limit_common`

    - ### Fields inherited from interface org.apache.uima.util.Logger

      `UIMA_MARKER_CONFIG, UIMA_MARKER_FINEST`

    - ### Fields inherited from interface org.slf4j.Logger

      `ROOT_LOGGER_NAME`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JSR47Logger_impl` | `getInstance()` Creates a new JSR47Logger instance with the default JSR-47 framework logger
    `static Logger` | `getInstance(Class<?> component)` Creates a new JSR47Logger instance for the specified source class
    `static Logger` | `getInstance(JSR47Logger_impl l, int limit)`
    `static Level` | `getJSR47Level(Level level, org.slf4j.Marker m)` JSR-47 level mapping to UIMA level mapping.
    `JSR47Logger_impl` | `getLimitedLogger(int limit)`
    `String` | `getName()`
    `boolean` | `isDebugEnabled()`
    `boolean` | `isDebugEnabled(org.slf4j.Marker arg0)`
    `boolean` | `isErrorEnabled()`
    `boolean` | `isErrorEnabled(org.slf4j.Marker arg0)`
    `boolean` | `isInfoEnabled()`
    `boolean` | `isInfoEnabled(org.slf4j.Marker arg0)`
    `boolean` | `isLoggable(Level level)` Checks if the argument level is greater or equal to the specified level
    `boolean` | `isLoggable(Level level, org.slf4j.Marker m)` Checks if this logger is enabled for this level and this marker
    `boolean` | `isTraceEnabled()`
    `boolean` | `isTraceEnabled(org.slf4j.Marker arg0)`
    `boolean` | `isWarnEnabled()`
    `boolean` | `isWarnEnabled(org.slf4j.Marker arg0)`
    `void` | `log(org.slf4j.Marker m, String aFqcn, Level level, String msg, Object[] args, Throwable throwable)` The main log call implemented by subclasses
    `void` | `log(org.slf4j.Marker m, String aFqcn, Level level, String msg, Throwable throwable)` The version of the main log call implemented by subclasses that skips the substitution because it already was done by rb()
    `void` | `log2(org.slf4j.Marker m, String aFqcn, Level level, String msg, Object[] args, Throwable throwable)` The version of the main log call implemented by subclasses that uses {}, not {n} as the substitutable syntax.
    `void` | `setLevel(Level level)` Sets the level of messages that will be logged by this logger.
    `void` | `setOutputStream(OutputStream out)` Deprecated. use external configuration possibility
    `void` | `setOutputStream(PrintStream out)` Deprecated. use external configuration possibility

    - ### Methods inherited from class org.apache.uima.util.impl.Logger_common_impl

      `debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, getMarkerForLevel, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, isAnnotatorLogger, isEmpty, log, log, log, log, log, log, log, logException, logrb, logrb, logrb, logrb, rb, setAnnotatorLogger, setResourceManager, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn, warn, 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.apache.uima.util.Logger

      `rb_ue`

- - ### Method Detail

    - #### getInstance

          public static Logger getInstance(Class<?> component)

      Creates a new JSR47Logger 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(JSR47Logger_impl l,
                                           int limit)

    - #### getInstance

          public static JSR47Logger_impl getInstance()

      Creates a new JSR47Logger instance with the default JSR-47 framework logger
      Returns:
        Logger returns the JSR47Logger object with the default JSR-47 framework logger

    - #### getLimitedLogger

          public JSR47Logger_impl getLimitedLogger(int limit)

      Parameters:
        `limit` - the limit
      Returns:
        a copy of the logger with the throttling limit set, or the same logger if no change

    - #### setOutputStream

          @Deprecated
          public void setOutputStream(OutputStream out)

      Deprecated. use external configuration possibility
      Description copied from interface: `Logger`
      Sets the output stream to which log messages will go. Setting the output stream to `null` will disable the logger.
      Overrides:
        `setOutputStream` in class `Logger_common_impl`
      Parameters:
        `out` - `OutputStream` to which log messages will be printed
      See Also:
        `Logger.setOutputStream(java.io.OutputStream)`

    - #### setOutputStream

          @Deprecated
          public void setOutputStream(PrintStream out)

      Deprecated. use external configuration possibility
      Description copied from interface: `Logger`
      Sets the output stream to which log messages will go. Setting the output stream to `null` will disable the logger.
      Overrides:
        `setOutputStream` in class `Logger_common_impl`
      Parameters:
        `out` - `PrintStream` to which log messages will be printed
      See Also:
        `Logger.setOutputStream(java.io.PrintStream)`

    - #### getJSR47Level

          public static Level getJSR47Level(Level level,
                                            org.slf4j.Marker m)

      JSR-47 level mapping to UIMA level mapping. Maps via marker values for UIMA_MARKER_CONFIG and UIMA_MARKER_FINEST SEVERE (highest value) -%gt; SEVERE
      WARNING -%gt; WARNING
      INFO -%gt; INFO
      CONFIG -%gt; CONFIG
      FINE -%gt; FINE
      FINER -%gt; FINER
      FINEST (lowest value) -%gt; FINEST
      OFF -%gt; OFF
      ALL -%gt; ALL
      Parameters:
        `level` - uima level
        `m` - the marker
      Returns:
        Level - corresponding JSR47 level

    - #### 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 m)

      Description copied from interface: `Logger`
      Checks if this logger is enabled for this level and this marker
      Parameters:
        `level` - the level to test
        `m` - 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 msg,
                          Object[] args,
                          Throwable throwable)

      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
        `msg` - -
        `args` - - arguments to be substituted into the message
        `throwable` - - can be null

    - #### log

          public void log(org.slf4j.Marker m,
                          String aFqcn,
                          Level level,
                          String msg,
                          Throwable throwable)

      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
        `msg` - -
        `throwable` - - can be null

    - #### log2

          public void log2(org.slf4j.Marker m,
                           String aFqcn,
                           Level level,
                           String msg,
                           Object[] args,
                           Throwable throwable)

      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
        `msg` - -
        `args` - - arguments to be substituted into the message
        `throwable` - - 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)

Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.