Package net.i2p.util
Class FileLogWriter
- java.lang.Object
-
- net.i2p.util.LogWriter
-
- net.i2p.util.FileLogWriter
-
-
Field Summary
-
Fields inherited from class net.i2p.util.LogWriter
_manager, _write, FLUSH_INTERVAL
-
-
Constructor Summary
Constructors Constructor Description FileLogWriter(LogManager manager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseWriter()StringcurrentFile()File may not exist or have old logs in it if not opened yetprotected voidflushWriter()protected voidwriteRecord(int priority, String val)Write a single String verbatim to the writer.protected voidwriteRecord(LogRecord rec, String formatted)Write the provided LogRecord to the writer.-
Methods inherited from class net.i2p.util.LogWriter
flushRecords, flushRecords, run, setFlushInterval, stopWriting
-
-
-
-
Constructor Detail
-
FileLogWriter
public FileLogWriter(LogManager manager)
-
-
Method Detail
-
currentFile
public String currentFile()
File may not exist or have old logs in it if not opened yet- Specified by:
currentFilein classLogWriter- Returns:
- non-null
-
writeRecord
protected void writeRecord(LogRecord rec, String formatted)
Description copied from class:LogWriterWrite the provided LogRecord to the writer.- Specified by:
writeRecordin classLogWriter- Parameters:
rec- the LogRecord to write.formatted- a String pre-formatted from rec, may be ignored.
-
writeRecord
protected void writeRecord(int priority, String val)Description copied from class:LogWriterWrite a single String verbatim to the writer.- Specified by:
writeRecordin classLogWriter- Parameters:
priority- the level to log the line at.val- the String to write.
-
flushWriter
protected void flushWriter()
- Specified by:
flushWriterin classLogWriter- Since:
- 0.9.19
-
closeWriter
protected void closeWriter()
- Specified by:
closeWriterin classLogWriter- Since:
- 0.9.19 renamed from closeFile()
-
-