wt.wrmf.logs
Class LogFileWriter

java.lang.Object
  extended bywt.wrmf.logs.LogFileWriter

public class LogFileWriter
extends Object


Field Summary
static String ATTR_INFO
           
static String ATTR_LOG_NAME
           
static String ATTR_LOG_SEGMENT
           
private  SimpleDateFormat dateFormat
           
protected  EventLog log
           
protected  OutputStream os
           
static String TAG_EVENT
           
static String TAG_JAVATIME
           
static String TAG_LOG
           
static String TAG_MESSAGE
           
static String TAG_RECORD
           
static String TAG_SERVICE
           
static String TAG_TARGET
           
static String TAG_TARGET_CLASS
           
static String TAG_TARGET_NAME
           
static String TAG_TARGET_URL
           
static String TAG_TARGET_VERSION
           
static String TAG_TIME
           
static String TAG_USER
           
 
Constructor Summary
LogFileWriter(EventLog log, OutputStream os)
           
 
Method Summary
protected  void writeDate(Date date)
           
protected  void writeInfoProperties(LogRecord record)
           
protected  void writeInfoProperty(String infoname, String infovalue)
           
 void writeNewLog()
           
 void writeRecord(LogRecord record)
           
 void writeSampleRecord()
           
protected  void writeString(String str)
           
protected  void writeTag(String tag, Object value)
           
protected  void writeTargetFields(LogRecord record)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

os

protected OutputStream os

log

protected EventLog log

dateFormat

private SimpleDateFormat dateFormat

TAG_LOG

public static final String TAG_LOG
See Also:
Constant Field Values

TAG_RECORD

public static final String TAG_RECORD
See Also:
Constant Field Values

TAG_TIME

public static final String TAG_TIME
See Also:
Constant Field Values

TAG_JAVATIME

public static final String TAG_JAVATIME
See Also:
Constant Field Values

TAG_USER

public static final String TAG_USER
See Also:
Constant Field Values

TAG_SERVICE

public static final String TAG_SERVICE
See Also:
Constant Field Values

TAG_EVENT

public static final String TAG_EVENT
See Also:
Constant Field Values

TAG_TARGET

public static final String TAG_TARGET
See Also:
Constant Field Values

TAG_TARGET_NAME

public static final String TAG_TARGET_NAME
See Also:
Constant Field Values

TAG_TARGET_CLASS

public static final String TAG_TARGET_CLASS
See Also:
Constant Field Values

TAG_TARGET_VERSION

public static final String TAG_TARGET_VERSION
See Also:
Constant Field Values

TAG_TARGET_URL

public static final String TAG_TARGET_URL
See Also:
Constant Field Values

TAG_MESSAGE

public static final String TAG_MESSAGE
See Also:
Constant Field Values

ATTR_INFO

public static final String ATTR_INFO
See Also:
Constant Field Values

ATTR_LOG_NAME

public static final String ATTR_LOG_NAME
See Also:
Constant Field Values

ATTR_LOG_SEGMENT

public static final String ATTR_LOG_SEGMENT
See Also:
Constant Field Values
Constructor Detail

LogFileWriter

public LogFileWriter(EventLog log,
                     OutputStream os)
Method Detail

writeNewLog

public void writeNewLog()
                 throws IOException
Throws:
IOException

writeSampleRecord

public void writeSampleRecord()
                       throws IOException
Throws:
IOException

writeRecord

public void writeRecord(LogRecord record)
                 throws IOException
Throws:
IOException

writeString

protected void writeString(String str)
                    throws IOException
Throws:
IOException

writeDate

protected void writeDate(Date date)
                  throws IOException
Throws:
IOException

writeTag

protected void writeTag(String tag,
                        Object value)
                 throws IOException
Throws:
IOException

writeTargetFields

protected void writeTargetFields(LogRecord record)
                          throws IOException
Throws:
IOException

writeInfoProperties

protected void writeInfoProperties(LogRecord record)
                            throws IOException
Throws:
IOException

writeInfoProperty

protected void writeInfoProperty(String infoname,
                                 String infovalue)
                          throws IOException
Throws:
IOException