org.openmobileis.common.util.log
Class FileOpenCloseLogTracer

java.lang.Object
  extended byorg.openmobileis.common.util.log.DefaultLogTracer
      extended byorg.openmobileis.common.util.log.FileOpenCloseLogTracer
All Implemented Interfaces:
LogTracer

public class FileOpenCloseLogTracer
extends DefaultLogTracer

Title: OpenMobileIS project source
Implement a LogTracer that Log in a File. The File is define by specifing the property LOGFILE. Implements an archiving system. Define the property LOGDIRARCHIVE to define the directory where log are archived.

Since:
JDK1.1
Version:
1.0
Author:
P.Delrieu

Field Summary
protected  java.io.FileOutputStream fileStream
           
protected  java.lang.String logFile
           
 
Fields inherited from class org.openmobileis.common.util.log.DefaultLogTracer
outStream
 
Constructor Summary
FileOpenCloseLogTracer()
           
 
Method Summary
 java.io.File getLogFile()
           
 void setLogTracerProperties(java.util.Properties props)
          Two property are defined : LOGFILE : file where log are written.
 void trace(int service, int priority, java.lang.String message)
          Trace the message to the stream defined showing the specified priority and service.
 
Methods inherited from class org.openmobileis.common.util.log.DefaultLogTracer
finalize, getLogPrintStream, setLogStream
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileStream

protected java.io.FileOutputStream fileStream

logFile

protected java.lang.String logFile
Constructor Detail

FileOpenCloseLogTracer

public FileOpenCloseLogTracer()
Method Detail

setLogTracerProperties

public void setLogTracerProperties(java.util.Properties props)
Two property are defined : LOGFILE : file where log are written. LOGDIRARCHIVE : directory where old log are archived.

Specified by:
setLogTracerProperties in interface LogTracer
Overrides:
setLogTracerProperties in class DefaultLogTracer

trace

public void trace(int service,
                  int priority,
                  java.lang.String message)
Trace the message to the stream defined showing the specified priority and service.

Specified by:
trace in interface LogTracer
Overrides:
trace in class DefaultLogTracer

getLogFile

public java.io.File getLogFile()


Copyright 2006 OpenMobileIS. All Rights Reserved.