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 84 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. | |
Static Public Member Functions | |
static void | attachLogTracerToPriority (int priority, LogTracer t) |
attache the specified logTracer to a priority. | |
static synchronized LogManager | getInstance (Properties props) |
<font color="#009999"> This methods return the only LogManager instance. | |
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. | |
static LogTracer | getLogTracer () |
static void | setLogTracer (LogTracer t) |
Protected Member Functions | |
LogManager (Properties props) | |
The constructor is protected in order to use the class LogManager like a singleton. | |
LogManager () | |
Static Protected Attributes | |
static LogManager | instance = null |
Static instance of LogManager. | |
static LogTracer | tracer |
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 114 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.logTable. |
|
<font color="#009999"> This methods return the only </font>
Reimplemented in org.openmobileis.common.util.log.FileLogManager. Definition at line 125 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.instance, and org.openmobileis.common.util.log.LogManager.LogManager(). |
|
Trace the Object with specified service and priority to the Log system. If object is an exception the track is traced. Definition at line 142 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 187 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 179 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 227 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 171 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 195 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 219 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 211 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 235 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 203 of file LogManager.java. References org.openmobileis.common.util.log.LogManager.instance, and org.openmobileis.common.util.log.LogManager.trace(). |