|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openmobileis.common.util.log.LogManager
This class permits to manage log. LogManager is an abstract class to
hide the underneath log. It can be mapped to Log4J or other log API.
We provide default log for console and file log.
Any other log manager can be plug.
Default log id define with tree parameters :
service : the service that log. defined by the class LogServices.
priority : the log priority defined by the class LogPriorities.
the log object. The toString method is call on the object except for exception where the
printStackTrace methode is call.
Some helper method is defined to faclitate the use of log that define default values for Service or priority.
LogManager is initialized by calling the getInstance method.
If null is provided, default console logging is set.
All log are done using LogManager class.
exemple :
....
public void methodRed () {
....
LogManager.traceInfo(0, "Log in methodRed");
....
....
try {
} catch (java.lang.OpenMSPException exec ) {
LogManager.traceError(0, exec);
}
}
Field Summary | |
protected static LogManager |
instance
Static instance of LogManager |
protected static java.util.HashMap |
logTable
|
protected LogTracer |
tracer
|
Constructor Summary | |
protected |
LogManager()
|
protected |
LogManager(java.util.Properties props)
The constructor is protected in order to use the class LogManager
like a singleton. |
Method Summary | |
static void |
attachLogTracerToPriority(int priority,
LogTracer t)
attache the specified logTracer to a priority. |
static LogManager |
getInstance()
This methods return the only LogManager instance.
|
LogTracer |
getLogTracer()
|
static void |
registerLogManager(java.util.Properties props)
|
void |
setLogTracer(LogTracer t)
|
void |
trace(int service,
int priority,
java.lang.Object obj)
Trace the Object with specified service and priority to the Log system. |
static void |
trace(OpenMISException exp)
|
static void |
traceAlert(int service,
java.lang.Object obj)
Trace the Object in ALERT priority with specified service to the Log system. |
static void |
traceCritique(int service,
java.lang.Object obj)
Trace the Object in CRITIQUE priority with specified service to the Log system. |
static void |
traceDebug(int service,
java.lang.Object obj)
Trace the Object in DEBUG priority with specified service to the Log system. |
static void |
traceEmergency(int service,
java.lang.Object obj)
Trace the Object in EMERGENCY priority with specified service to the Log system. |
static void |
traceError(int service,
java.lang.Object obj)
Trace the Object in ERROR priority with specified service to the Log system. |
static void |
traceInfo(int service,
java.lang.Object obj)
Trace the Object in INFO priority with specified service to the Log system. |
static void |
traceNotice(int service,
java.lang.Object obj)
Trace the Object in NOTICE priority with specified service to the Log system. |
static void |
traceUserSynchro(int service,
java.lang.Object obj)
Trace the Object in DEBUG priority with specified service to the Log system. |
static void |
traceWarning(int service,
java.lang.Object obj)
Trace the Object in WARNING priority with specified service to the Log system. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static LogManager instance
protected LogTracer tracer
protected static java.util.HashMap logTable
Constructor Detail |
protected LogManager(java.util.Properties props)
LogManager
like a singleton.
protected LogManager()
Method Detail |
public static void attachLogTracerToPriority(int priority, LogTracer t)
public static LogManager getInstance()
LogManager
instance.
public static void registerLogManager(java.util.Properties props)
public static void trace(OpenMISException exp)
public void trace(int service, int priority, java.lang.Object obj)
public static void traceEmergency(int service, java.lang.Object obj)
public static void traceCritique(int service, java.lang.Object obj)
public static void traceAlert(int service, java.lang.Object obj)
public static void traceError(int service, java.lang.Object obj)
public static void traceWarning(int service, java.lang.Object obj)
public static void traceNotice(int service, java.lang.Object obj)
public static void traceInfo(int service, java.lang.Object obj)
public static void traceDebug(int service, java.lang.Object obj)
public static void traceUserSynchro(int service, java.lang.Object obj)
public LogTracer getLogTracer()
public void setLogTracer(LogTracer t)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |