jp.co.scs.mbench
クラス LogWriter

java.lang.Object
  上位を拡張 java.lang.Thread
      上位を拡張 jp.co.scs.mbench.LogWriter
すべての実装されたインタフェース:
java.lang.Runnable
直系の既知のサブクラス:
StubBenchmarkManagerLogWriter

public class LogWriter
extends java.lang.Thread

System log handler (writer)

作成者:
Tetsuro Ikeda

入れ子のクラスの概要
 
クラス java.lang.Thread から継承された入れ子のクラス/インタフェース
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
フィールドの概要
static int DEBUG
          Log level:Debug
static int ERROR
          Log level:Error
static int INFO
          Log level:Info
 
クラス java.lang.Thread から継承されたフィールド
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
コンストラクタの概要
LogWriter(java.lang.String logName)
          Creates a log writer instance with the log file name.
 
メソッドの概要
 void clean()
          clean
 int getLogLevel()
          Gets the level of log.
 java.lang.String getLogName()
          Gets the log file name.
 int getLogQueueSize()
          Gets the size of log list.
 void init()
          initializes
 boolean isInitialized()
          Gets the flag for initialize.
 boolean isRunning()
          Gets the flag for initialize.
 void run()
          Write log to the file, stdout then repeat.
 void setLogLevel(int logLevel)
          Sets the level of log.
 void setLogName(java.lang.String logName)
          Sets the log file name.
 void write(int level, java.lang.String desc)
          Add system log to the queue.
 
クラス java.lang.Thread から継承されたメソッド
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

DEBUG

public static final int DEBUG
Log level:Debug

関連項目:
定数フィールド値

INFO

public static final int INFO
Log level:Info

関連項目:
定数フィールド値

ERROR

public static final int ERROR
Log level:Error

関連項目:
定数フィールド値
コンストラクタの詳細

LogWriter

public LogWriter(java.lang.String logName)
Creates a log writer instance with the log file name.

パラメータ:
logName - log file name
メソッドの詳細

getLogName

public java.lang.String getLogName()
Gets the log file name.

戻り値:
log file name

setLogName

public void setLogName(java.lang.String logName)
Sets the log file name.

パラメータ:
logName - log file name

getLogLevel

public int getLogLevel()
Gets the level of log.

戻り値:
level of log

setLogLevel

public void setLogLevel(int logLevel)
Sets the level of log.

パラメータ:
logLevel - level of log

isInitialized

public boolean isInitialized()
Gets the flag for initialize.

戻り値:
flag for initialize

isRunning

public boolean isRunning()
Gets the flag for initialize.

戻り値:
flag for initialize

getLogQueueSize

public int getLogQueueSize()
Gets the size of log list.

戻り値:
size of log list.

init

public void init()
          throws BenchmarkTerminateException
initializes

例外:
BenchmarkTerminateException - benchmark should be terminated

write

public void write(int level,
                  java.lang.String desc)
Add system log to the queue.

パラメータ:
level - log level for this log
desc - matter of log

run

public void run()
Write log to the file, stdout then repeat.

定義:
インタフェース java.lang.Runnable 内の run
オーバーライド:
クラス java.lang.Thread 内の run

clean

public void clean()
clean