abstract class LogWriter extends Object implements Runnable
| Modifier and Type | Field and Description |
|---|---|
protected LogManager |
_manager |
protected boolean |
_write |
(package private) static long |
FLUSH_INTERVAL |
| Constructor and Description |
|---|
LogWriter(LogManager manager) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
closeWriter() |
abstract 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)
Set the flush interval for the log writer.
|
void |
stopWriting() |
protected abstract void |
writeRecord(int priority,
String line)
Write a single String verbatim to the writer.
|
protected abstract void |
writeRecord(LogRecord rec,
String formatted)
Write the provided LogRecord to the writer.
|
protected final LogManager _manager
protected volatile boolean _write
static final long FLUSH_INTERVAL
public LogWriter(LogManager manager)
protected abstract void closeWriter()
public abstract String currentFile()
public void flushRecords()
public void flushRecords(boolean shouldWait)
protected abstract void flushWriter()
public void setFlushInterval(long interval)
interval - the interval in millisecondspublic void stopWriting()
protected abstract void writeRecord(int priority,
String line)
priority - the level to log the line at.line - the String to write.