Package net.i2p.util
Class FileLogWriter
java.lang.Object
net.i2p.util.LogWriter
net.i2p.util.FileLogWriter
- All Implemented Interfaces:
Runnable
File-based log writer thread that pulls log records from the LogManager,
writes them to the current logfile, and rotates the logs as necessary.
- Since:
- 0.9.26 moved from LogWriter
-
Field Summary
Fields inherited from class net.i2p.util.LogWriter
_manager, _write, FLUSH_INTERVAL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
File may not exist or have old logs in it if not opened yetprotected void
protected void
writeRecord
(int priority, String val) Write a single String verbatim to the writer.protected void
writeRecord
(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 Details
-
FileLogWriter
-
-
Method Details
-
currentFile
File may not exist or have old logs in it if not opened yet- Specified by:
currentFile
in classLogWriter
- Returns:
- non-null
-
writeRecord
Description copied from class:LogWriter
Write the provided LogRecord to the writer.- Specified by:
writeRecord
in classLogWriter
- Parameters:
rec
- the LogRecord to write.formatted
- a String pre-formatted from rec, may be ignored.
-
writeRecord
Description copied from class:LogWriter
Write a single String verbatim to the writer.- Specified by:
writeRecord
in classLogWriter
- Parameters:
priority
- the level to log the line at.val
- the String to write.
-
flushWriter
protected void flushWriter()- Specified by:
flushWriter
in classLogWriter
- Since:
- 0.9.19
-
closeWriter
protected void closeWriter()- Specified by:
closeWriter
in classLogWriter
- Since:
- 0.9.19 renamed from closeFile()
-