Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members

org.openmobileis.common.util.log.LogManager Class Reference

Inheritance diagram for org.openmobileis.common.util.log.LogManager:

org.openmobileis.common.util.log.FileLogManager List of all members.

Detailed Description

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);
    }

  }

Author:
P.Delrieu
Version:
1.0
Since:
JDK1.1
See also:
:org.openmobileis.common.util.log.LogPriorities

:org.openmobileis.common.util.log.LogServices

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


Member Function Documentation

static void org.openmobileis.common.util.log.LogManager.attachLogTracerToPriority int  priority,
LogTracer  t
[static]
 

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.

static synchronized LogManager org.openmobileis.common.util.log.LogManager.getInstance Properties  props  )  [static]
 

<font color="#009999"> This methods return the only LogManager instance.

</font>

Returns:
the only instance

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().

void org.openmobileis.common.util.log.LogManager.trace int  service,
int  priority,
Object  obj
 

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.

static void org.openmobileis.common.util.log.LogManager.traceAlert int  service,
Object  obj
[static]
 

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().

static void org.openmobileis.common.util.log.LogManager.traceCritique int  service,
Object  obj
[static]
 

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().

static void org.openmobileis.common.util.log.LogManager.traceDebug int  service,
Object  obj
[static]
 

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().

static void org.openmobileis.common.util.log.LogManager.traceEmergency int  service,
Object  obj
[static]
 

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().

static void org.openmobileis.common.util.log.LogManager.traceError int  service,
Object  obj
[static]
 

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().

static void org.openmobileis.common.util.log.LogManager.traceInfo int  service,
Object  obj
[static]
 

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().

static void org.openmobileis.common.util.log.LogManager.traceNotice int  service,
Object  obj
[static]
 

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().

static void org.openmobileis.common.util.log.LogManager.traceUserSynchro int  service,
Object  obj
[static]
 

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().

static void org.openmobileis.common.util.log.LogManager.traceWarning int  service,
Object  obj
[static]
 

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().


The documentation for this class was generated from the following file:
Generated on Thu Oct 6 10:06:39 2005 for OpenMobileIS by  doxygen 1.4.3