|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmdx.kernel.log.impl.Log
org.opencrx.kernel.log.AuditLog
public class AuditLog
| Field Summary |
|---|
| Fields inherited from class org.openmdx.kernel.log.impl.Log |
|---|
isMicrosoftVM |
| Method Summary | |
|---|---|
static void |
criticalError(String logString,
Object logObj)
Logs a text string at CRITICAL_ERROR_LEVEL. |
static void |
detail(String logString)
Logs a text string at DETAIL_LEVEL. |
static void |
detail(String logString,
Object logObj)
Logs a text string at DETAIL_LEVEL. |
static void |
detail(String logString,
Object logObj,
int callStackOff)
Logs a text string at DETAIL_LEVEL. |
static void |
error(String logString)
Logs a text string at ERROR_LEVEL. |
static void |
error(String logString,
Object logObj)
Logs a text string at ERROR_LEVEL. |
static void |
error(String logString,
Object logObj,
int callStackOff)
Logs a text string at ERROR_LEVEL. |
static Config |
getLogConfig()
Returns the logger's configuration object |
static void |
info(String logString)
Logs a text string at INFO_LEVEL. |
static void |
info(String logString,
Object logObj)
Logs a text string at INFO_LEVEL. |
static void |
info(String logString,
Object logObj,
int callStackOff)
Logs a text string at INFO_LEVEL. |
static boolean |
isTraceOn()
Checks if trace logging is active |
static void |
setApplicationName(String appName)
Deprecated. use setConfigName(String) instead |
static void |
setConfigName(String cfgName)
Set the config name that the logs pertain to. |
static void |
setLogLevel(int logLevel)
Deprecated. use Config.setLogLevel(int) from the
getLogConfig() class |
static void |
setLogProperties(Properties props)
Sets the log properties [Config-Level-3]. |
static void |
setLogSource(Object logSource)
Set a log source object. |
static void |
trace(String logString)
Logs a text string at TRACE_LEVEL. |
static void |
trace(String logString,
Object logObj)
Logs a text string at TRACE_LEVEL. |
static void |
trace(String logString,
Object logObj,
int callStackOff)
Logs a text string at TRACE_LEVEL. |
static void |
warning(String logString)
Logs a text string at WARNING_LEVEL. |
static void |
warning(String logString,
Object logObj)
Logs a text string at WARNING_LEVEL. |
static void |
warning(String logString,
Object logObj,
int callStackOff)
Logs a text string at WARNING_LEVEL. |
| Methods inherited from class org.openmdx.kernel.log.impl.Log |
|---|
finalize, getActiveEntities, getBootstrapLogger, getConfig, getDateOpened, getHostName, getLoggingLevel, getLogProperties, getMechanismManager, getName, getReadableEntities, getReader, getRemoveableEntities, isBooted, isLoggingPerformance, isLoggingStatistics, loadConfig, loadMechanisms, logEvent, logString, mechanismAddedEvent, mechanismRemovedEvent, newLog, removeEntity, setApplicationControlledTrace, setLoggingLevel, setLoggingPerformance, setLoggingStatistics, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static void setConfigName(String cfgName)
cfgName - a config namepublic static void setLogSource(Object logSource)
Dynamic log source example:
class LogSource
{
public String toString()
{
return "LogSource-" + System.currentTimeMillis();
}
}
LogSource logSource = new LogSource();
AuditLog.setLogSource(logSource)
Static log source example:
AuditLog.setLogSource("LogSource")
logSource - a log source objectpublic static void setLogProperties(Properties props)
properties - the log propertiespublic static Config getLogConfig()
public static boolean isTraceOn()
Applications can use this method before they call AuditLog.trace(...) if the log string creation is very time consuming.
AuitLog.trace("Customer created", "First=Mark, Last=Smith");
if (AuditLog.isTraceOn()) {
summary = expensive_creation();
detail = expensive_creation();
AuditLog.trace(summary, detail);
}
public static void criticalError(String logString,
Object logObj)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.logObj - a log object providing detail information. The log object is
stringified using its toString method before getting
logged. The log object may be a null object. If the log object
is a Throwable it's message and stack trace is
logged.#criticalError(String),
#criticalError(String, Object, int)
public static void error(String logString,
Object logObj)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.logObj - a log object providing detail information. The log object is
stringified using its toString method before getting
logged. The log object may be a null object. If the log object
is a Throwable it's message and stack trace is
logged.error(String),
error(String, Object, int)public static void error(String logString)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.error(String, Object),
error(String, Object, int)
public static void error(String logString,
Object logObj,
int callStackOff)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.logObj - a log object providing detail information. The log object is
stringified using its toString method before getting
logged. The log object may be a null object. If the log object
is a Throwable it's message and stack trace is
logged.callStackOff - a call stack correction offset. The offset must be a positive
number: 0, 1, 2, 3, ...error(String),
error(String, Object)
public static void warning(String logString,
Object logObj)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.logObj - a log object providing detail information. The log object is
stringified using its toString method before getting
logged. The log object may be a null object. If the log object
is a Throwable it's message and stack trace is
logged.warning(String),
warning(String, Object, int)public static void warning(String logString)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.warning(String, Object),
warning(String, Object, int)
public static void warning(String logString,
Object logObj,
int callStackOff)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.logObj - a log object providing detail information. The log object is
stringified using its toString method before getting
logged. The log object may be a null object. If the log object
is a Throwable it's message and stack trace is
logged.callStackOff - a call stack correction offset. The offset must be a positive
number: 0, 1, 2, 3, ...warning(String),
warning(String, Object)
public static void info(String logString,
Object logObj)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.logObj - a log object providing detail information. The log object is
stringified using its toString method before getting
logged. The log object may be a null object. If the log object
is a Throwable it's message and stack trace is
logged.info(String),
info(String, Object, int)public static void info(String logString)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.info(String, Object),
info(String, Object, int)
public static void info(String logString,
Object logObj,
int callStackOff)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.logObj - a log object providing detail information. The log object is
stringified using its toString method before getting
logged. The log object may be a null object. If the log object
is a Throwable it's message and stack trace is
logged.callStackOff - a call stack correction offset. The offset must be a positive
number: 0, 1, 2, 3, ...info(String),
info(String, Object)
public static void detail(String logString,
Object logObj)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.logObj - a log object providing detail information. The log object is
stringified using its toString method before getting
logged. The log object may be a null object. If the log object
is a Throwable it's message and stack trace is
logged.detail(String),
detail(String, Object, int)public static void detail(String logString)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.detail(String, Object),
detail(String, Object, int)
public static void detail(String logString,
Object logObj,
int callStackOff)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.logObj - a log object providing detail information. The log object is
stringified using its toString method before getting
logged. The log object may be a null object. If the log object
is a Throwable it's message and stack trace is
logged.callStackOff - a call stack correction offset. The offset must be a positive
number: 0, 1, 2, 3, ...detail(String),
detail(String, Object)
public static void trace(String logString,
Object logObj)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.logObj - a log object providing detail information. The log object is
stringified using its toString method before getting
logged. The log object may be a null object. If the log object
is a Throwable it's message and stack trace is
logged.trace(String),
trace(String, Object, int)public static void trace(String logString)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.trace(String, Object),
trace(String, Object, int)
public static void trace(String logString,
Object logObj,
int callStackOff)
logString - a concise summary message. The message must be single line and
must therefore not contain any '\r' or '\n' characters. The '\r'
and '\n' characters are removed silently from the message.logObj - a log object providing detail information. The log object is
stringified using its toString method before getting
logged. The log object may be a null object. If the log object
is a Throwable it's message and stack trace is
logged.callStackOff - a call stack correction offset. The offset must be a positive
number: 0, 1, 2, 3, ...trace(String),
trace(String, Object)public static void setApplicationName(String appName)
setConfigName(String) instead
appName - the application namepublic static void setLogLevel(int logLevel)
Config.setLogLevel(int) from the
getLogConfig() class
This method should not be used by applications. The logging level is set in the log property file.
level - a new logging level
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||