Package org.apache.uima.util.impl
Class Log4jLogger_impl
- java.lang.Object
-
- org.apache.uima.util.impl.Log4jLogger_impl
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static LoggergetInstance()Creates a new Log4jLogger instance with the default Log4j framework loggerstatic LoggergetInstance(java.lang.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 levelvoidlog(java.lang.String aMessage)Deprecated.use new function with log levelvoidlog(java.lang.String aResourceBundleName, java.lang.String aMessageKey, java.lang.Object[] aArguments)Deprecated.use new function with log levelvoidlog(java.lang.String wrapperFQCN, Level level, java.lang.String message, java.lang.Throwable thrown)Generic logging method intended for logging wrappers.voidlog(Level level, java.lang.String aMessage)Logs a message.voidlog(Level level, java.lang.String aMessage, java.lang.Object param1)Logs a message with one parametervoidlog(Level level, java.lang.String aMessage, java.lang.Object[] params)Logs a message with an arbitrary number of parametersvoidlog(Level level, java.lang.String aMessage, java.lang.Throwable thrown)Logs a message and a throwable objectvoidlogException(java.lang.Exception aException)Deprecated.use new function with log levelvoidlogrb(Level level, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String bundleName, java.lang.String msgKey)Logs a message with a message key.voidlogrb(Level level, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String bundleName, java.lang.String msgKey, java.lang.Object param1)Logs a message with a message key and one parameter.voidlogrb(Level level, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String bundleName, java.lang.String msgKey, java.lang.Object[] params)Logs a message with a message key and an arbitrary number of parameters.voidlogrb(Level level, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String bundleName, java.lang.String msgKey, java.lang.Throwable thrown)Logs a message with a message key and a throwable object.voidsetLevel(Level level)Sets the level of messages that will be logged by this logger.voidsetOutputStream(java.io.OutputStream out)Deprecated.use external configuration possibilityvoidsetOutputStream(java.io.PrintStream out)Deprecated.use external configuration possibilityvoidsetResourceManager(ResourceManager resourceManager)Sets the ResourceManager to use for message localization.
-
-
-
Method Detail
-
getInstance
public static Logger getInstance(java.lang.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
-
log
@Deprecated public void log(java.lang.String aMessage)
Deprecated.use new function with log levelLogs a message with level INFO.
-
log
@Deprecated public void log(java.lang.String aResourceBundleName, java.lang.String aMessageKey, java.lang.Object[] aArguments)Deprecated.use new function with log levelLogs a message with a message key and the level INFO- Specified by:
login interfaceLogger- Parameters:
aResourceBundleName- base name of resource bundleaMessageKey- key of message to localize with message level INFOaArguments- arguments to message (may be null if none)- See Also:
Logger.log(java.lang.String, java.lang.String, java.lang.Object[])
-
logException
@Deprecated public void logException(java.lang.Exception aException)
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 public void setOutputStream(java.io.OutputStream out)
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:
Logger.setOutputStream(java.io.OutputStream)
-
setOutputStream
@Deprecated public void setOutputStream(java.io.PrintStream out)
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:
Logger.setOutputStream(java.io.PrintStream)
-
isLoggable
public boolean isLoggable(Level level)
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
public void setLevel(Level level)
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
public void log(Level level, java.lang.String aMessage)
Description copied from interface:LoggerLogs a message.
-
log
public void log(Level level, java.lang.String aMessage, java.lang.Object param1)
Description copied from interface:LoggerLogs a message with one parameter
-
log
public void log(Level level, java.lang.String aMessage, java.lang.Object[] params)
Description copied from interface:LoggerLogs a message with an arbitrary number of parameters
-
log
public void log(Level level, java.lang.String aMessage, java.lang.Throwable thrown)
Description copied from interface:LoggerLogs a message and a throwable object
-
logrb
public void logrb(Level level, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String bundleName, java.lang.String msgKey, java.lang.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, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String bundleName, java.lang.String msgKey, java.lang.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, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String bundleName, java.lang.String msgKey, java.lang.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, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String bundleName, java.lang.String msgKey)
Description copied from interface:LoggerLogs a message with a message key. The real message is extracted from a resource bundle.
-
log
public void log(java.lang.String wrapperFQCN, Level level, java.lang.String message, java.lang.Throwable thrown)Description copied from interface:LoggerGeneric logging method intended for logging wrappers.
-
setResourceManager
public void setResourceManager(ResourceManager resourceManager)
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.
-
-