|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Logger
A Logger
is a component used to log messages. This interface defines the standard
way for UIMA components to produce log output.
In the UIMA SDK, this interface is implemented using the Java 1.4 logger as a back end. If you want to configure the logger, for example to specify the location of the log file and the logging level, you should use the standard Java 1.4 logger properties or the java.util.logging APIs. See the section "Specifying the Logging Configuration" in the Annotator and Analysis Engine Developer's Guide chapter of the UIMA documentation for more information.
Method Summary | |
---|---|
boolean |
isLoggable(Level level)
Checks if the argument level is greater or equal to the specified level |
void |
log(Level level,
String aMessage)
Logs a message. |
void |
log(Level level,
String aMessage,
Object param1)
Logs a message with one parameter |
void |
log(Level level,
String aMessage,
Object[] params)
Logs a message with an arbitrary number of parameters |
void |
log(Level level,
String aMessage,
Throwable thrown)
Logs a message and a throwable object |
void |
log(String aMessage)
Deprecated. use new function with log level |
void |
log(String aResourceBundleName,
String aMessageKey,
Object[] aArguments)
Deprecated. use new function with log level |
void |
logException(Exception aException)
Deprecated. use new function with log level |
void |
logrb(Level level,
String sourceClass,
String sourceMethod,
String bundleName,
String msgKey)
Logs a message with a message key. |
void |
logrb(Level level,
String sourceClass,
String sourceMethod,
String bundleName,
String msgKey,
Object param1)
Logs a message with a message key and one parameter. |
void |
logrb(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. |
void |
logrb(Level level,
String sourceClass,
String sourceMethod,
String bundleName,
String msgKey,
Throwable thrown)
Logs a message with a message key and a throwable object. |
void |
setLevel(Level level)
Sets the level of messages that will be logged by this logger. |
void |
setOutputStream(OutputStream aStream)
Deprecated. use external configuration possibility |
void |
setOutputStream(PrintStream aStream)
Deprecated. use external configuration possibility |
void |
setResourceManager(ResourceManager resourceManager)
Sets the ResourceManager to use for message localization. |
Method Detail |
---|
@Deprecated void log(String aMessage)
aMessage
- the message to be logged with message level INFO@Deprecated void log(String aResourceBundleName, String aMessageKey, Object[] aArguments)
aResourceBundleName
- base name of resource bundleaMessageKey
- key of message to localize with message level INFOaArguments
- arguments to message (may be null if none)@Deprecated void logException(Exception aException)
aException
- the exception to be logged with message level INFO@Deprecated void setOutputStream(PrintStream aStream)
null
will disable the logger.
aStream
- PrintStream
to which log messages will be printed@Deprecated void setOutputStream(OutputStream aStream)
null
will disable the logger.
aStream
- OutputStream
to which log messages will be printedvoid log(Level level, String aMessage)
level
- message levelaMessage
- the message to be loggedvoid log(Level level, String aMessage, Object param1)
level
- message levelaMessage
- the message to be loggedparam1
- message parametervoid log(Level level, String aMessage, Object[] params)
level
- message levelaMessage
- the message to be loggedparams
- message parameter arrayvoid log(Level level, String aMessage, Throwable thrown)
level
- message levelaMessage
- the message to be loggedthrown
- throwable objectvoid logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey)
level
- message levelsourceClass
- source class namesourceMethod
- source method namebundleName
- resource bundlemsgKey
- message keyvoid logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey, Object param1)
level
- message levelsourceClass
- source class namesourceMethod
- source method namebundleName
- resource bundlemsgKey
- message keyparam1
- message parametervoid logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey, Object[] params)
level
- message levelsourceClass
- source class namesourceMethod
- source method namebundleName
- resource bundlemsgKey
- message keyparams
- message parameter array with an arbitrary number of parametersvoid logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey, Throwable thrown)
level
- message levelsourceClass
- source class namesourceMethod
- source method namebundleName
- resource bundlemsgKey
- message keythrown
- throwable objectboolean isLoggable(Level level)
level
- message level
void setLevel(Level level)
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 flexibilty it configuring the logger, consider using the standard Java logger properties file or the java.util.logging APIs.
level
- message levelvoid setResourceManager(ResourceManager resourceManager)
resourceManager
- A resource manager instance whose extension ClassLoader (if any) will be used for
message localization by this logger.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |