Inheritance diagram for org.openmobileis.common.util.log.LogManager:
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);
}
}
Definition at line 85 of file LogManager.java.
Public Member Functions | |
void | trace (int service, int priority, Object obj) |
Trace the Object with specified service and priority to the Log system. | |
LogTracer | getLogTracer () |
void | setLogTracer (LogTracer t) |
Static Public Member Functions | |
static void | attachLogTracerToPriority (int priority, LogTracer t) |
attache the specified logTracer to a priority. | |
static synchronized LogManager | getInstance () |
<FONT color="#009999"> This methods return the only LogManager instance. | |
static synchronized void | registerLogManager (Properties props) |
static void | trace (OpenMISException exp) |
static void | traceEmergency (int service, Object obj) |
Trace the Object in EMERGENCY priority with specified service to the Log system. | |
static void | traceCritique (int service, Object obj) |
Trace the Object in CRITIQUE priority with specified service to the Log system. | |
static void | traceAlert (int service, Object obj) |
Trace the Object in ALERT priority with specified service to the Log system. | |
static void | traceError (int service, Object obj) |
Trace the Object in ERROR priority with specified service to the Log system. | |
static void | traceWarning (int service, Object obj) |
Trace the Object in WARNING priority with specified service to the Log system. | |
static void | traceNotice (int service, Object obj) |
Trace the Object in NOTICE priority with specified service to the Log system. | |
static void | traceInfo (int service, Object obj) |
Trace the Object in INFO priority with specified service to the Log system. | |
static void | traceDebug (int service, Object obj) |
Trace the Object in DEBUG priority with specified service to the Log system. | |
static void | traceUserSynchro (int service, Object obj) |
Trace the Object in DEBUG priority with specified service to the Log system. | |
Protected Member Functions | |
LogManager (Properties props) | |
The constructor is protected in order to use the class LogManager like a singleton. | |
LogManager () | |
Protected Attributes | |
LogTracer | tracer |
Static Protected Attributes | |
static LogManager | instance = null |
Static instance of LogManager. | |
static HashMap | logTable |
|
attache the specified logTracer to a priority. No attached priority use the default logTracer to trace. Attached priority will use the specified tracer to log. Definition at line 116 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.logTable. |
|
<FONT color="#009999"> This methods return the only </FONT>
Definition at line 127 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.instance. |
|
Trace the Object with specified service and priority to the Log system. If object is an exception the track is traced. Definition at line 145 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.logTable, org.openmobileis.common.util.log.LogTracer.trace(), and org.openmobileis.common.util.log.LogManager.tracer. |
|
Trace the Object in ALERT priority with specified service to the Log system. If object is an exception the track is traced. Definition at line 190 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.instance, and org.openmobileis.common.util.log.LogManager.trace(). |
|
Trace the Object in CRITIQUE priority with specified service to the Log system. If object is an exception the track is traced. Definition at line 182 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.instance, and org.openmobileis.common.util.log.LogManager.trace(). |
|
Trace the Object in DEBUG priority with specified service to the Log system. If object is an exception the track is traced. Definition at line 230 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.instance, and org.openmobileis.common.util.log.LogManager.trace(). |
|
Trace the Object in EMERGENCY priority with specified service to the Log system. If object is an exception the track is traced. Definition at line 174 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.instance, and org.openmobileis.common.util.log.LogManager.trace(). |
|
Trace the Object in ERROR priority with specified service to the Log system. If object is an exception the track is traced. Definition at line 198 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.instance, and org.openmobileis.common.util.log.LogManager.trace(). |
|
Trace the Object in INFO priority with specified service to the Log system. If object is an exception the track is traced. Definition at line 222 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.instance, and org.openmobileis.common.util.log.LogManager.trace(). |
|
Trace the Object in NOTICE priority with specified service to the Log system. If object is an exception the track is traced. Definition at line 214 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.instance, and org.openmobileis.common.util.log.LogManager.trace(). |
|
Trace the Object in DEBUG priority with specified service to the Log system. If object is an exception the track is traced. Definition at line 238 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.instance, and org.openmobileis.common.util.log.LogManager.trace(). |
|
Trace the Object in WARNING priority with specified service to the Log system. If object is an exception the track is traced. Definition at line 206 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.instance, and org.openmobileis.common.util.log.LogManager.trace(). |