java.lang.Runnable
FileLogWriter
abstract class LogWriter
extends java.lang.Object
implements java.lang.Runnable
修飾子とタイプ | フィールド | 説明 |
---|---|---|
protected LogManager |
_manager |
|
protected boolean |
_write |
|
(package private) static long |
FLUSH_INTERVAL |
コンストラクタ | 説明 |
---|---|
LogWriter(LogManager manager) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
protected abstract void |
closeWriter() |
|
abstract java.lang.String |
currentFile() |
File may not exist or have old logs in it if not opened yet
|
void |
flushRecords() |
|
void |
flushRecords(boolean shouldWait) |
|
protected abstract void |
flushWriter() |
|
void |
run() |
|
void |
setFlushInterval(long interval) |
|
void |
stopWriting() |
|
protected abstract void |
writeRecord(int priority,
java.lang.String line) |
Write a single String verbatim to the writer.
|
protected abstract void |
writeRecord(LogRecord rec,
java.lang.String formatted) |
Write the provided LogRecord to the writer.
|
static final long FLUSH_INTERVAL
protected final LogManager _manager
protected volatile boolean _write
public LogWriter(LogManager manager)
public abstract java.lang.String currentFile()
protected abstract void writeRecord(LogRecord rec, java.lang.String formatted)
rec
- the LogRecord to write.formatted
- a String pre-formatted from rec, may be ignored.protected abstract void writeRecord(int priority, java.lang.String line)
priority
- the level to log the line at.line
- the String to write.protected abstract void flushWriter()
protected abstract void closeWriter()
public void stopWriting()
public void setFlushInterval(long interval)
interval
- mspublic void run()
run
インタフェース内 java.lang.Runnable
public void flushRecords()
public void flushRecords(boolean shouldWait)