Package org.apache.uima.util.impl
Class Log4jLogger_impl
java.lang.Object
org.apache.uima.util.impl.Log4jLogger_impl
- All Implemented Interfaces:
Logger
UIMA Logging interface implementation for Log4j
-
Method Summary
Modifier and TypeMethodDescriptionstatic LoggerCreates a new Log4jLogger instance with the default Log4j framework loggerstatic LoggergetInstance(Class<?> component) Creates a new Log4jLogger instance for the specified source classbooleanisLoggable(Level level) Checks if the argument level is greater or equal to the specified levelvoidDeprecated.use new function with log levelvoidDeprecated.use new function with log levelvoidGeneric 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 new function with log levelvoidLogs 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 Log4jLogger instance for the specified source class- Parameters:
component- current source class- Returns:
- Logger returns the JSR47Logger object for the specified class
-
getInstance
Creates a new Log4jLogger instance with the default Log4j framework logger- Returns:
- Logger returns the JSR47Logger object with the default Log4j framework logger
-
log
Deprecated.use new function with log levelLogs a message with level INFO. -
log
Deprecated.use new function with log levelLogs a message with a message key and the level INFO -
logException
Deprecated.use new function with log levelLogs an exception with 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
-
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.
-
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. -
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.
-