Package org.apache.uima.util.impl
Class Logger_impl
java.lang.Object
org.apache.uima.util.impl.Logger_impl
- All Implemented Interfaces:
Logger
UIMA Logging interface implementation without using an logging toolkit
-
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 classbooleanisLoggable(Level level) Checks if the argument level is greater or equal to the specified levelvoidDeprecated.use method with log level as parametervoidDeprecated.use method with log level as parametervoidGeneric logging method intended for logging wrappers.voidLogs a message.voidLogs a message with one parametervoidLogs a message with an arbitrary number of parametersvoidLogs a message and a throwable objectvoidlogException(Exception aException) Deprecated.use method with log level as parametervoidLogs a message with a message key.voidlogrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey, Object param1) Logs a message with a message key and one parameter.voidlogrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey, Object[] params) Logs a message with a message key and an arbitrary number of parameters.voidlogrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey, Throwable thrown) Logs a message with a message key and a throwable object.voidSets the level of messages that will be logged by this logger.voidDeprecated.use external configuration possibilityvoidDeprecated.use external configuration possibilityvoidsetResourceManager(ResourceManager resourceManager) Sets the ResourceManager to use for message localization.
-
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
-
log
Deprecated.use method with log level as parameterLogs a message with message level INFO -
log
Deprecated.use method with log level as parameterLogs a message with a message key and with the message level INFO -
logException
Deprecated.use method with log level as parameterLogs an exception with message level INFO- Specified by:
logExceptionin interfaceLogger- Parameters:
aException- the exception to be logged
-
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- 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- 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- Specified by:
isLoggablein interfaceLogger- Parameters:
level- message level- Returns:
- boolean - true if the argument level is greater or equal to the specified level
-
log
Description copied from interface:LoggerLogs a message. -
log
Description copied from interface:LoggerLogs a message with one parameter -
log
Description copied from interface:LoggerLogs a message with an arbitrary number of parameters -
log
Description copied from interface:LoggerLogs a message and a throwable object -
logrb
public void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey, Object param1) Description copied from interface:LoggerLogs a message with a message key and one parameter. The real message is extracted from a resource bundle. -
logrb
public void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey, Object[] params) Description copied from interface:LoggerLogs a message with a message key and an arbitrary number of parameters. The real message is extracted from a resource bundle. -
logrb
public void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey, Throwable thrown) Description copied from interface:LoggerLogs a message with a message key and a throwable object. The real message is extracted from a resource bundle. -
logrb
public void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey) Description copied from interface:LoggerLogs a message with a message key. The real message is extracted from a resource bundle. -
log
Description copied from interface:LoggerGeneric logging method intended for logging wrappers. -
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.
-
setResourceManager
Description copied from interface:LoggerSets the ResourceManager to use for message localization. This method is intended for use by the framework, not by user code.- Specified by:
setResourceManagerin interfaceLogger- Parameters:
resourceManager- A resource manager instance whose extension ClassLoader (if any) will be used for message localization by this logger.
-