|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.middleware.container.utils.LogUtils
public class LogUtils
Logging utility class. Call one of the static methods of this class to add
new log entries to a logger. Log entries may also be forwarded to various
other LogListener
s.
Security considerations:
Since the log entries are forwarded to custom log listeners, the
msgPart
should contain only unmodifiable content.
Constructor Summary | |
---|---|
LogUtils()
|
Method Summary | |
---|---|
static void |
logDebug(ModuleContext mc,
Class claz,
String method,
Object[] msgPart,
Throwable t)
Provides a standard way for using container-specific loggers for logging debug messages via ModuleContext.logDebug(String, String, Throwable) . |
static void |
logDebug(ModuleContext mc,
Class claz,
String method,
String msg)
Simplified proxy method for logDebug(ModuleContext, Class, String, Object[], Throwable) ,
added for convenience. |
static void |
logError(ModuleContext mc,
Class claz,
String method,
Object[] msgPart,
Throwable t)
Provides a standard way for using container-specific loggers for logging error messages via ModuleContext.logError(String, String, Throwable) . |
static void |
logError(ModuleContext mc,
Class claz,
String method,
String msg)
Simplified proxy method for logError(ModuleContext, Class, String, Object[], Throwable) ,
added for convenience. |
static void |
logInfo(ModuleContext mc,
Class claz,
String method,
Object[] msgPart,
Throwable t)
Provides a standard way for using container-specific loggers for logging info messages via ModuleContext.logInfo(String, String, Throwable) . |
static void |
logInfo(ModuleContext mc,
Class claz,
String method,
String msg)
Simplified proxy method for logInfo(ModuleContext, Class, String, Object[], Throwable) ,
added for convenience. |
static void |
logTrace(ModuleContext mc,
Class claz,
String method,
Object[] msgPart,
Throwable t)
Provides a standard way for using container-specific loggers for logging trace messages via ModuleContext.logTrace(String, String, Throwable) . |
static void |
logTrace(ModuleContext mc,
Class claz,
String method,
String msg)
Simplified proxy method for logTrace(ModuleContext, Class, String, Object[], Throwable) ,
added for convenience. |
static void |
logWarn(ModuleContext mc,
Class claz,
String method,
Object[] msgPart,
Throwable t)
Provides a standard way for using container-specific loggers for logging warn messages via ModuleContext.logWarn(String, String, Throwable) . |
static void |
logWarn(ModuleContext mc,
Class claz,
String method,
String msg)
Simplified proxy method for logWarn(ModuleContext, Class, String, Object[], Throwable) ,
added for convenience. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LogUtils()
Method Detail |
---|
public static void logDebug(ModuleContext mc, Class claz, String method, Object[] msgPart, Throwable t)
ModuleContext.logDebug(String, String, Throwable)
. The advantage
compared to using
ModuleContext.logDebug(String, String, Throwable)
directly is
twofold:
LogListener
are notified
automatically, andModuleContext.logDebug(String, String, Throwable)
is built in a
structured way by concatenating several different info (see the
parameters as well as buildMsg(Object[])
).
mc
- the ModuleContext
needed for accessing the
container-specific logger for the corresponding moduleclaz
- The Java class that wants to generate the log messagemethod
- The name of the method in the above Java class that intends to
generate the log messagemsgPart
- An array of strings and other objects that should be
concatenated using String.valueOf(Object)
in
order to construct the log messaget
- An optional Throwable
object like an
exception that might have caused the log requestpublic static void logDebug(ModuleContext mc, Class claz, String method, String msg)
logDebug(ModuleContext, Class, String, Object[], Throwable)
,
added for convenience.
mc
- the ModuleContext
needed for accessing the
container-specific logger for the corresponding moduleclaz
- The Java class that wants to generate the log messagemethod
- The name of the method in the above Java class that intends to
generate the log messagemsg
- The log message as a simple Stringpublic static void logError(ModuleContext mc, Class claz, String method, Object[] msgPart, Throwable t)
ModuleContext.logError(String, String, Throwable)
. The advantage
compared to using
ModuleContext.logError(String, String, Throwable)
directly is
twofold:
LogListener
are notified
automatically, andModuleContext.logError(String, String, Throwable)
is built in a
structured way by concatenating several different info (see the
parameters as well as buildMsg(Object[])
).
mc
- the ModuleContext
needed for accessing the
container-specific logger for the corresponding moduleclaz
- The Java class that wants to generate the log messagemethod
- The name of the method in the above Java class that intends to
generate the log messagemsgPart
- An array of strings and other objects that should be
concatenated using String.valueOf(Object)
in
order to construct the log messaget
- An optional Throwable
object like an
exception that might have caused the log requestpublic static void logError(ModuleContext mc, Class claz, String method, String msg)
logError(ModuleContext, Class, String, Object[], Throwable)
,
added for convenience.
mc
- the ModuleContext
needed for accessing the
container-specific logger for the corresponding moduleclaz
- The Java class that wants to generate the log messagemethod
- The name of the method in the above Java class that intends to
generate the log messagemsg
- The log message as a simple Stringpublic static void logInfo(ModuleContext mc, Class claz, String method, Object[] msgPart, Throwable t)
ModuleContext.logInfo(String, String, Throwable)
. The advantage
compared to using
ModuleContext.logInfo(String, String, Throwable)
directly is
twofold:
LogListener
are notified
automatically, andModuleContext.logInfo(String, String, Throwable)
is built in a
structured way by concatenating several different info (see the
parameters as well as buildMsg(Object[])
).
mc
- the ModuleContext
needed for accessing the
container-specific logger for the corresponding moduleclaz
- The Java class that wants to generate the log messagemethod
- The name of the method in the above Java class that intends to
generate the log messagemsgPart
- An array of strings and other objects that should be
concatenated using String.valueOf(Object)
in
order to construct the log messaget
- An optional Throwable
object like an
exception that might have caused the log requestpublic static void logInfo(ModuleContext mc, Class claz, String method, String msg)
logInfo(ModuleContext, Class, String, Object[], Throwable)
,
added for convenience.
mc
- the ModuleContext
needed for accessing the
container-specific logger for the corresponding moduleclaz
- The Java class that wants to generate the log messagemethod
- The name of the method in the above Java class that intends to
generate the log messagemsg
- The log message as a simple Stringpublic static void logWarn(ModuleContext mc, Class claz, String method, Object[] msgPart, Throwable t)
ModuleContext.logWarn(String, String, Throwable)
. The advantage
compared to using
ModuleContext.logWarn(String, String, Throwable)
directly is
twofold:
LogListener
are notified
automatically, andModuleContext.logWarn(String, String, Throwable)
is built in a
structured way by concatenating several different info (see the
parameters as well as buildMsg(Object[])
).
mc
- the ModuleContext
needed for accessing the
container-specific logger for the corresponding moduleclaz
- The Java class that wants to generate the log messagemethod
- The name of the method in the above Java class that intends to
generate the log messagemsgPart
- An array of strings and other objects that should be
concatenated using String.valueOf(Object)
in
order to construct the log messaget
- An optional Throwable
object like an
exception that might have caused the log requestpublic static void logWarn(ModuleContext mc, Class claz, String method, String msg)
logWarn(ModuleContext, Class, String, Object[], Throwable)
,
added for convenience.
mc
- the ModuleContext
needed for accessing the
container-specific logger for the corresponding moduleclaz
- The Java class that wants to generate the log messagemethod
- The name of the method in the above Java class that intends to
generate the log messagemsg
- The log message as a simple Stringpublic static void logTrace(ModuleContext mc, Class claz, String method, Object[] msgPart, Throwable t)
ModuleContext.logTrace(String, String, Throwable)
. The advantage
compared to using
ModuleContext.logTrace(String, String, Throwable)
directly is
twofold:
LogListener
are notified
automatically, andModuleContext.logTrace(String, String, Throwable)
is built in a
structured way by concatenating several different info (see the
parameters as well as buildMsg(Object[])
).
mc
- the ModuleContext
needed for accessing the
container-specific logger for the corresponding moduleclaz
- The Java class that wants to generate the log messagemethod
- The name of the method in the above Java class that intends to
generate the log messagemsgPart
- An array of strings and other objects that should be
concatenated using String.valueOf(Object)
in
order to construct the log messaget
- An optional Throwable
object like an
exception that might have caused the log requestpublic static void logTrace(ModuleContext mc, Class claz, String method, String msg)
logTrace(ModuleContext, Class, String, Object[], Throwable)
,
added for convenience.
mc
- the ModuleContext
needed for accessing the
container-specific logger for the corresponding moduleclaz
- The Java class that wants to generate the log messagemethod
- The name of the method in the above Java class that intends to
generate the log messagemsg
- The log message as a simple String
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |