Package org.apache.uima.util.impl
Class Logger_impl
java.lang.Object
org.apache.uima.util.impl.Logger_common_impl
org.apache.uima.util.impl.Logger_impl
- All Implemented Interfaces:
Logger,org.slf4j.Logger
UIMA Logging interface implementation without using an logging toolkit Logger names are not used
The call getInstance() returns a common shared instance. The call getInstance(String) ignores its
argument but returns a new instance of this logger class.
Each instance of this logger class can have a level set via the setAPI call - that is the only
configuration possible. If not set, the level is INFO.
-
Field Summary
Fields inherited from class org.apache.uima.util.impl.Logger_common_impl
EMPTY_STACK_TRACE_INFO, EXCEPTION_MESSAGE, fqcn, fqcnCmn, limit_commonFields inherited from interface org.apache.uima.util.Logger
UIMA_MARKER_CONFIG, UIMA_MARKER_FINESTFields inherited from interface org.slf4j.Logger
ROOT_LOGGER_NAME -
Method Summary
Modifier and TypeMethodDescriptionstatic Loggercreates a new Logger instance for the specified source classstatic LoggergetInstance(Class<?> component) creates a new Logger instance for the specified source classgetLimitedLogger(int aLimit) getName()booleanbooleanisDebugEnabled(org.slf4j.Marker arg0) booleanbooleanisErrorEnabled(org.slf4j.Marker arg0) booleanbooleanisInfoEnabled(org.slf4j.Marker arg0) booleanisLoggable(Level level) Checks if the argument level is greater or equal to the specified levelbooleanisLoggable(Level level, org.slf4j.Marker marker) Checks if this logger is enabled for this level and this markerbooleanbooleanisTraceEnabled(org.slf4j.Marker arg0) booleanbooleanisWarnEnabled(org.slf4j.Marker arg0) voidThe main log call implemented by subclassesvoidThe version of the main log call implemented by subclasses that skips the substitution because it already was done by rb()voidlog2(org.slf4j.Marker m, String aFqcn, Level level, String message, Object[] args, Throwable thrown) The version of the main log call implemented by subclasses that uses {}, not {n} as the substitutable syntax.voidSets the level of messages that will be logged by this logger.voidDeprecated.use external configuration possibilityvoidDeprecated.use external configuration possibilityMethods 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
-
Method Details
-
getInstance
creates a new Logger instance for the specified source class- Parameters:
component- current source class- Returns:
- Logger - returns the Logger object for the specified class
-
getInstance
creates a new Logger instance for the specified source class- Returns:
- Logger - returns a new Logger object
-
getLimitedLogger
- Parameters:
aLimit- the limit- Returns:
- a copy of the logger with the throttling limit set, or the same logger if no change
-
setOutputStream
Deprecated.use external configuration possibilityDescription copied from interface:LoggerSets the output stream to which log messages will go. Setting the output stream tonullwill disable the logger.- Specified by:
setOutputStreamin interfaceLogger- Overrides:
setOutputStreamin classLogger_common_impl- Parameters:
out-OutputStreamto which log messages will be printed- See Also:
-
setOutputStream
Deprecated.use external configuration possibilityDescription copied from interface:LoggerSets the output stream to which log messages will go. Setting the output stream tonullwill disable the logger.- Specified by:
setOutputStreamin interfaceLogger- Overrides:
setOutputStreamin classLogger_common_impl- Parameters:
out-PrintStreamto which log messages will be printed- See Also:
-
isLoggable
Description copied from interface:LoggerChecks 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
Description copied from interface:LoggerChecks if this logger is enabled for this level and this marker- Parameters:
level- the level to testmarker- null or the marker to test- Returns:
- true if the level is greater or equal to the specified level and the marker matches
-
log
public void log(org.slf4j.Marker m, String aFqcn, Level level, String message, Object[] args, Throwable thrown) Description copied from class:Logger_common_implThe main log call implemented by subclasses- Specified by:
login classLogger_common_impl- Parameters:
m- the markeraFqcn- the fully qualified class name of the top-most logging class used to filter the stack trace to get the caller class / method infolevel- the UIMA levelmessage- -args- - arguments to be substituted into the messagethrown- - can be null
-
log
Description copied from class:Logger_common_implThe version of the main log call implemented by subclasses that skips the substitution because it already was done by rb()- Specified by:
login classLogger_common_impl- Parameters:
m- the markeraFqcn- the fully qualified class name of the top-most logging class used to filter the stack trace to get the caller class / method infolevel- the UIMA levelmessage- -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_implThe 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:
log2in classLogger_common_impl- Parameters:
m- the markeraFqcn- the fully qualified class name of the top-most logging class used to filter the stack trace to get the caller class / method infolevel- the UIMA levelmessage- -args- - arguments to be substituted into the messagethrown- - can be null
-
setLevel
Description copied from interface:LoggerSets the level of messages that will be logged by this logger. Note that if you callUIMAFramework.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, useUIMAFramework.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
-
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)
-