public abstract class Logger_common_impl extends Object implements Logger
Logging "location" information:
Limiting or throttling loggers: This is normally done using logger configuration. For cases where UIMA is running as an embedded library, sometimes Annotators log excessivly, and users do not have access to the logging configuration. But they do have access to APIs which create the UIMA pipelines.
V3 supports an additional param, AnalysisEngine.PARAM_THROTTLE_EXCESSIVE_ANNOTATOR_LOGGING which if set, specifies a limit of the number of log messages issued by Annotator code.
This requires:
The loggers with a limit are cloned for the particular pipeline (represented by the root UIMA context), so that setting the limit only affects one pipeline.
The common part of logging does:
Modifier and Type | Field and Description |
---|---|
protected static String[] |
EMPTY_STACK_TRACE_INFO |
protected static String |
EXCEPTION_MESSAGE |
protected String |
fqcn |
protected String |
fqcnCmn |
protected int |
limit_common |
UIMA_MARKER_CONFIG, UIMA_MARKER_FINEST
Modifier | Constructor and Description |
---|---|
protected |
Logger_common_impl(Class<?> component) |
protected |
Logger_common_impl(Logger_common_impl lci,
int limit)
Copy constructor for limited loggers
|
Modifier and Type | Method and Description |
---|---|
void |
debug(org.slf4j.Marker arg0,
String arg1) |
void |
debug(org.slf4j.Marker arg0,
String arg1,
Object... arg2) |
void |
debug(org.slf4j.Marker arg0,
String arg1,
Object arg2) |
void |
debug(org.slf4j.Marker arg0,
String arg1,
Object arg2,
Object arg3) |
void |
debug(org.slf4j.Marker marker,
String message,
Supplier<?>... paramSuppliers) |
void |
debug(org.slf4j.Marker arg0,
String arg1,
Throwable arg2) |
void |
debug(org.slf4j.Marker marker,
Supplier<String> msgSupplier) |
void |
debug(org.slf4j.Marker marker,
Supplier<String> msgSupplier,
Throwable throwable) |
void |
debug(String arg0)
Convert standard call varieties
|
void |
debug(String arg0,
Object... arg1) |
void |
debug(String arg0,
Object arg1) |
void |
debug(String arg0,
Object arg1,
Object arg2) |
void |
debug(String message,
Supplier<?>... paramSuppliers) |
void |
debug(String arg0,
Throwable arg1) |
void |
debug(Supplier<String> msgSupplier) |
void |
debug(Supplier<String> msgSupplier,
Throwable throwable) |
void |
error(org.slf4j.Marker arg0,
String arg1) |
void |
error(org.slf4j.Marker arg0,
String arg1,
Object... arg2) |
void |
error(org.slf4j.Marker arg0,
String arg1,
Object arg2) |
void |
error(org.slf4j.Marker arg0,
String arg1,
Object arg2,
Object arg3) |
void |
error(org.slf4j.Marker marker,
String message,
Supplier<?>... paramSuppliers) |
void |
error(org.slf4j.Marker arg0,
String arg1,
Throwable arg2) |
void |
error(org.slf4j.Marker marker,
Supplier<String> msgSupplier) |
void |
error(org.slf4j.Marker marker,
Supplier<String> msgSupplier,
Throwable throwable) |
void |
error(String arg0) |
void |
error(String arg0,
Object... arg1) |
void |
error(String arg0,
Object arg1) |
void |
error(String arg0,
Object arg1,
Object arg2) |
void |
error(String message,
Supplier<?>... paramSuppliers) |
void |
error(String arg0,
Throwable arg1) |
void |
error(Supplier<String> msgSupplier) |
void |
error(Supplier<String> msgSupplier,
Throwable throwable) |
static org.slf4j.Marker |
getMarkerForLevel(Level level) |
void |
info(org.slf4j.Marker arg0,
String arg1) |
void |
info(org.slf4j.Marker arg0,
String arg1,
Object... arg2) |
void |
info(org.slf4j.Marker arg0,
String arg1,
Object arg2) |
void |
info(org.slf4j.Marker arg0,
String arg1,
Object arg2,
Object arg3) |
void |
info(org.slf4j.Marker marker,
String message,
Supplier<?>... paramSuppliers) |
void |
info(org.slf4j.Marker arg0,
String arg1,
Throwable arg2) |
void |
info(org.slf4j.Marker marker,
Supplier<String> msgSupplier) |
void |
info(org.slf4j.Marker marker,
Supplier<String> msgSupplier,
Throwable throwable) |
void |
info(String arg0) |
void |
info(String arg0,
Object... arg1) |
void |
info(String arg0,
Object arg1) |
void |
info(String arg0,
Object arg1,
Object arg2) |
void |
info(String message,
Supplier<?>... paramSuppliers) |
void |
info(String arg0,
Throwable arg1) |
void |
info(Supplier<String> msgSupplier) |
void |
info(Supplier<String> msgSupplier,
Throwable throwable) |
boolean |
isAnnotatorLogger()
This is true if the name of the logger corresponds to a class which implements
AnalysisComponent_ImplBase, which includes basic Annotators, plus Cas Multipliers
and CPP components.
|
protected boolean |
isEmpty(String v) |
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
|
abstract void |
log(org.slf4j.Marker m,
String aFqcn,
Level level,
String message,
Object[] args,
Throwable throwable)
The main log call implemented by subclasses
|
abstract void |
log(org.slf4j.Marker m,
String aFqcn,
Level level,
String message,
Throwable throwable)
The version of the main log call implemented by subclasses that skips the substitution
because it already was done by rb()
|
void |
log(String aMessage)
Deprecated.
use new function with log level
|
void |
log(String aFqcn,
Level level,
String message,
Throwable thrown)
Convert a standard UIMA call for wrapped loggers
|
void |
log(String aResourceBundleName,
String aMessageKey,
Object[] aArguments)
Deprecated.
use new function with log level
|
abstract void |
log2(org.slf4j.Marker m,
String aFqcn,
Level level,
String message,
Object[] args,
Throwable throwable)
The version of the main log call implemented by subclasses that uses {}, not {n} as the substitutable syntax.
|
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.
|
String |
rb(String bundleName,
String msgKey,
Object... parameters)
Get an internationalized message from a resource bundle by key name, substituting the parameters.
|
void |
setAnnotatorLogger(boolean v) |
void |
setOutputStream(OutputStream out)
Deprecated.
use external configuration possibility
|
void |
setOutputStream(PrintStream out)
Deprecated.
use external configuration possibility
|
void |
setResourceManager(ResourceManager resourceManager)
Sets the ResourceManager to use for message localization.
|
void |
trace(org.slf4j.Marker arg0,
String arg1) |
void |
trace(org.slf4j.Marker arg0,
String arg1,
Object... arg2) |
void |
trace(org.slf4j.Marker arg0,
String arg1,
Object arg2) |
void |
trace(org.slf4j.Marker arg0,
String arg1,
Object arg2,
Object arg3) |
void |
trace(org.slf4j.Marker marker,
String message,
Supplier<?>... paramSuppliers) |
void |
trace(org.slf4j.Marker arg0,
String arg1,
Throwable arg2) |
void |
trace(org.slf4j.Marker marker,
Supplier<String> msgSupplier) |
void |
trace(org.slf4j.Marker marker,
Supplier<String> msgSupplier,
Throwable throwable) |
void |
trace(String arg0) |
void |
trace(String arg0,
Object... arg1) |
void |
trace(String arg0,
Object arg1) |
void |
trace(String arg0,
Object arg1,
Object arg2) |
void |
trace(String message,
Supplier<?>... paramSuppliers) |
void |
trace(String arg0,
Throwable arg1) |
void |
trace(Supplier<String> msgSupplier) |
void |
trace(Supplier<String> msgSupplier,
Throwable throwable) |
void |
warn(org.slf4j.Marker arg0,
String arg1) |
void |
warn(org.slf4j.Marker arg0,
String arg1,
Object... arg2) |
void |
warn(org.slf4j.Marker arg0,
String arg1,
Object arg2) |
void |
warn(org.slf4j.Marker arg0,
String arg1,
Object arg2,
Object arg3) |
void |
warn(org.slf4j.Marker marker,
String message,
Supplier<?>... paramSuppliers) |
void |
warn(org.slf4j.Marker arg0,
String arg1,
Throwable arg2) |
void |
warn(org.slf4j.Marker marker,
Supplier<String> msgSupplier) |
void |
warn(org.slf4j.Marker marker,
Supplier<String> msgSupplier,
Throwable throwable) |
void |
warn(String arg0) |
void |
warn(String arg0,
Object... arg1) |
void |
warn(String arg0,
Object arg1) |
void |
warn(String arg0,
Object arg1,
Object arg2) |
void |
warn(String message,
Supplier<?>... paramSuppliers) |
void |
warn(String arg0,
Throwable arg1) |
void |
warn(Supplier<String> msgSupplier) |
void |
warn(Supplier<String> msgSupplier,
Throwable throwable) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLimitedLogger, isLoggable, isLoggable, rb_ue, setLevel
protected static final String EXCEPTION_MESSAGE
protected static final String[] EMPTY_STACK_TRACE_INFO
protected final String fqcn
protected final String fqcnCmn
protected final int limit_common
protected Logger_common_impl(Class<?> component)
protected Logger_common_impl(Logger_common_impl lci, int limit)
lci
- the original logger to copylimit
- the limitpublic abstract void log(org.slf4j.Marker m, String aFqcn, Level level, String message, Object[] args, Throwable throwable)
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 messagethrowable
- - can be nullpublic abstract void log2(org.slf4j.Marker m, String aFqcn, Level level, String message, Object[] args, Throwable throwable)
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 messagethrowable
- - can be nullpublic abstract void log(org.slf4j.Marker m, String aFqcn, Level level, String message, Throwable throwable)
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
- -throwable
- - can be nullpublic static org.slf4j.Marker getMarkerForLevel(Level level)
level
- the Uima Levelpublic void log(String aFqcn, Level level, String message, Throwable thrown)
aFqcn
- - fully qualified class name of highest level of logging impl.
The class / method above this in the stack trace is used
for identifying where the logging call originated from.level
- the uima Levelmessage
- the messagethrown
- may be null@Deprecated public void setOutputStream(OutputStream out)
Logger
null
will disable the logger.out
- OutputStream
to which log messages will be printedLogger.setOutputStream(java.io.OutputStream)
@Deprecated public void setOutputStream(PrintStream out)
Logger
null
will disable the logger.out
- PrintStream
to which log messages will be printedLogger.setOutputStream(java.io.PrintStream)
@Deprecated public void log(String aMessage)
aMessage
- the message to be logged@Deprecated public 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)Logger.log(java.lang.String, java.lang.String, java.lang.Object[])
@Deprecated public void logException(Exception aException)
aException
- the exception to be loggedpublic void log(Level level, String aMessage)
Logger
level
- message levelaMessage
- the message to be loggedpublic void log(Level level, String aMessage, Object param1)
Logger
level
- message levelaMessage
- the message to be loggedparam1
- message parameterpublic void log(Level level, String aMessage, Object[] params)
Logger
level
- message levelaMessage
- the message to be loggedparams
- message parameter arraypublic void log(Level level, String aMessage, Throwable thrown)
Logger
level
- message levelaMessage
- the message to be loggedthrown
- throwable objectpublic void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey, Object param1)
Logger
level
- message levelsourceClass
- source class namesourceMethod
- source method namebundleName
- resource bundlemsgKey
- message keyparam1
- message parameterpublic void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey, Object[] params)
Logger
level
- message levelsourceClass
- source class namesourceMethod
- source method namebundleName
- resource bundlemsgKey
- message keyparams
- message parameter array with an arbitrary number of parameterspublic void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey, Throwable thrown)
Logger
level
- message levelsourceClass
- source class namesourceMethod
- source method namebundleName
- resource bundlemsgKey
- message keythrown
- throwable objectpublic void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msgKey)
Logger
level
- message levelsourceClass
- source class namesourceMethod
- source method namebundleName
- resource bundlemsgKey
- message keypublic void setResourceManager(ResourceManager resourceManager)
Logger
resourceManager
- A resource manager instance whose extension ClassLoader (if any) will be used for
message localization by this logger.public String rb(String bundleName, String msgKey, Object... parameters)
Logger
bundleName
- -msgKey
- -parameters
- -protected boolean isEmpty(String v)
public boolean isAnnotatorLogger()
Logger
public void setAnnotatorLogger(boolean v)
public void debug(String arg0)
debug
in interface org.slf4j.Logger
public void debug(String arg0, Object... arg1)
debug
in interface org.slf4j.Logger
public void debug(String arg0, Throwable arg1)
debug
in interface org.slf4j.Logger
public void debug(org.slf4j.Marker arg0, String arg1)
debug
in interface org.slf4j.Logger
public void debug(String arg0, Object arg1, Object arg2)
debug
in interface org.slf4j.Logger
public void debug(org.slf4j.Marker arg0, String arg1, Object arg2)
debug
in interface org.slf4j.Logger
public void debug(org.slf4j.Marker arg0, String arg1, Object... arg2)
debug
in interface org.slf4j.Logger
public void debug(org.slf4j.Marker arg0, String arg1, Throwable arg2)
debug
in interface org.slf4j.Logger
public void debug(org.slf4j.Marker arg0, String arg1, Object arg2, Object arg3)
debug
in interface org.slf4j.Logger
public void debug(Supplier<String> msgSupplier)
msgSupplier
- A function, which when called, produces the desired log messagepublic void debug(Supplier<String> msgSupplier, Throwable throwable)
msgSupplier
- A function, which when called, produces the desired log messagethrowable
- the exception to logpublic void debug(org.slf4j.Marker marker, String message, Supplier<?>... paramSuppliers)
marker
- the marker data specific to this log statementmessage
- the message to logparamSuppliers
- An array of functions, which when called, produce the desired log message parameters.public void debug(String message, Supplier<?>... paramSuppliers)
message
- the message to logparamSuppliers
- An array of functions, which when called, produce the desired log message parameters.public void debug(org.slf4j.Marker marker, Supplier<String> msgSupplier)
marker
- the marker data specific to this log statementmsgSupplier
- A function, which when called, produces the desired log messagepublic void debug(org.slf4j.Marker marker, Supplier<String> msgSupplier, Throwable throwable)
marker
- the marker data specific to this log statementmsgSupplier
- A function, which when called, produces the desired log messagethrowable
- the exception to logpublic void error(String arg0)
error
in interface org.slf4j.Logger
public void error(String arg0, Object... arg1)
error
in interface org.slf4j.Logger
public void error(String arg0, Throwable arg1)
error
in interface org.slf4j.Logger
public void error(org.slf4j.Marker arg0, String arg1)
error
in interface org.slf4j.Logger
public void error(String arg0, Object arg1, Object arg2)
error
in interface org.slf4j.Logger
public void error(org.slf4j.Marker arg0, String arg1, Object arg2)
error
in interface org.slf4j.Logger
public void error(org.slf4j.Marker arg0, String arg1, Object... arg2)
error
in interface org.slf4j.Logger
public void error(org.slf4j.Marker arg0, String arg1, Throwable arg2)
error
in interface org.slf4j.Logger
public void error(org.slf4j.Marker arg0, String arg1, Object arg2, Object arg3)
error
in interface org.slf4j.Logger
public void error(Supplier<String> msgSupplier)
msgSupplier
- A function, which when called, produces the desired log messagepublic void error(Supplier<String> msgSupplier, Throwable throwable)
msgSupplier
- A function, which when called, produces the desired log messagethrowable
- the exception to logpublic void error(org.slf4j.Marker marker, String message, Supplier<?>... paramSuppliers)
marker
- the marker data specific to this log statementmessage
- the message to logparamSuppliers
- An array of functions, which when called, produce the desired log message parameters.public void error(String message, Supplier<?>... paramSuppliers)
message
- the message to logparamSuppliers
- An array of functions, which when called, produce the desired log message parameters.public void error(org.slf4j.Marker marker, Supplier<String> msgSupplier)
marker
- the marker data specific to this log statementmsgSupplier
- A function, which when called, produces the desired log messagepublic void error(org.slf4j.Marker marker, Supplier<String> msgSupplier, Throwable throwable)
marker
- the marker data specific to this log statementmsgSupplier
- A function, which when called, produces the desired log messagethrowable
- the exception to logpublic void info(String arg0)
info
in interface org.slf4j.Logger
public void info(org.slf4j.Marker arg0, String arg1)
info
in interface org.slf4j.Logger
public void info(String arg0, Object arg1, Object arg2)
info
in interface org.slf4j.Logger
public void info(org.slf4j.Marker arg0, String arg1, Object arg2)
info
in interface org.slf4j.Logger
public void info(org.slf4j.Marker arg0, String arg1, Object... arg2)
info
in interface org.slf4j.Logger
public void info(org.slf4j.Marker arg0, String arg1, Throwable arg2)
info
in interface org.slf4j.Logger
public void info(org.slf4j.Marker arg0, String arg1, Object arg2, Object arg3)
info
in interface org.slf4j.Logger
public void info(Supplier<String> msgSupplier)
msgSupplier
- A function, which when called, produces the desired log messagepublic void info(Supplier<String> msgSupplier, Throwable throwable)
msgSupplier
- A function, which when called, produces the desired log messagethrowable
- the exception to logpublic void info(org.slf4j.Marker marker, String message, Supplier<?>... paramSuppliers)
marker
- the marker data specific to this log statementmessage
- the message to logparamSuppliers
- An array of functions, which when called, produce the desired log
message parameters.public void info(String message, Supplier<?>... paramSuppliers)
message
- the message to logparamSuppliers
- An array of functions, which when called, produce the desired log message parameters.public void info(org.slf4j.Marker marker, Supplier<String> msgSupplier)
marker
- the marker data specific to this log statementmsgSupplier
- A function, which when called, produces the desired log messagepublic void info(org.slf4j.Marker marker, Supplier<String> msgSupplier, Throwable throwable)
marker
- the marker data specific to this log statementmsgSupplier
- A function, which when called, produces the desired log messagethrowable
- the exception to logpublic void trace(String arg0)
trace
in interface org.slf4j.Logger
public void trace(String arg0, Object... arg1)
trace
in interface org.slf4j.Logger
public void trace(String arg0, Throwable arg1)
trace
in interface org.slf4j.Logger
public void trace(org.slf4j.Marker arg0, String arg1)
trace
in interface org.slf4j.Logger
public void trace(String arg0, Object arg1, Object arg2)
trace
in interface org.slf4j.Logger
public void trace(org.slf4j.Marker arg0, String arg1, Object arg2)
trace
in interface org.slf4j.Logger
public void trace(org.slf4j.Marker arg0, String arg1, Object... arg2)
trace
in interface org.slf4j.Logger
public void trace(org.slf4j.Marker arg0, String arg1, Throwable arg2)
trace
in interface org.slf4j.Logger
public void trace(org.slf4j.Marker arg0, String arg1, Object arg2, Object arg3)
trace
in interface org.slf4j.Logger
public void trace(Supplier<String> msgSupplier)
msgSupplier
- A function, which when called, produces the desired log messagepublic void trace(Supplier<String> msgSupplier, Throwable throwable)
msgSupplier
- A function, which when called, produces the desired log messagethrowable
- the exception to logpublic void trace(org.slf4j.Marker marker, String message, Supplier<?>... paramSuppliers)
marker
- the marker data specific to this log statementmessage
- the message to logparamSuppliers
- An array of functions, which when called, produce the desired log
message parameters.public void trace(String message, Supplier<?>... paramSuppliers)
message
- the message to logparamSuppliers
- An array of functions, which when called, produce the desired log message parameters.public void trace(org.slf4j.Marker marker, Supplier<String> msgSupplier)
marker
- the marker data specific to this log statementmsgSupplier
- A function, which when called, produces the desired log messagepublic void trace(org.slf4j.Marker marker, Supplier<String> msgSupplier, Throwable throwable)
marker
- the marker data specific to this log statementmsgSupplier
- A function, which when called, produces the desired log messagethrowable
- the exception to logpublic void warn(String arg0)
warn
in interface org.slf4j.Logger
public void warn(org.slf4j.Marker arg0, String arg1)
warn
in interface org.slf4j.Logger
public void warn(String arg0, Object arg1, Object arg2)
warn
in interface org.slf4j.Logger
public void warn(org.slf4j.Marker arg0, String arg1, Object arg2)
warn
in interface org.slf4j.Logger
public void warn(org.slf4j.Marker arg0, String arg1, Object... arg2)
warn
in interface org.slf4j.Logger
public void warn(org.slf4j.Marker arg0, String arg1, Throwable arg2)
warn
in interface org.slf4j.Logger
public void warn(org.slf4j.Marker arg0, String arg1, Object arg2, Object arg3)
warn
in interface org.slf4j.Logger
public void warn(Supplier<String> msgSupplier)
msgSupplier
- A function, which when called, produces the desired log messagepublic void warn(Supplier<String> msgSupplier, Throwable throwable)
msgSupplier
- A function, which when called, produces the desired log messagethrowable
- the exception to logpublic void warn(org.slf4j.Marker marker, String message, Supplier<?>... paramSuppliers)
marker
- the marker data specific to this log statementmessage
- the message to logparamSuppliers
- An array of functions, which when called, produce the desired log
message parameters.public void warn(String message, Supplier<?>... paramSuppliers)
message
- the message to logparamSuppliers
- An array of functions, which when called, produce the desired log message parameters.public void warn(org.slf4j.Marker marker, Supplier<String> msgSupplier)
marker
- the marker data specific to this log statementmsgSupplier
- A function, which when called, produces the desired log messageCopyright © 2006–2021 The Apache Software Foundation. All rights reserved.