java.lang.Object
net.i2p.addressbook.Log
A simple log with automatic time stamping.
Field Details
MAX_LINES
private static final int MAX_LINESLines kept before the oldest are dropped.- See Also:
DATE_PATTERN
Matches the date at the start of a log line.file
The log file being written.
Constructor Details
Log
Construct a Log instance that writes to the File file.- Parameters:
file- A File for the log to write to.
Method Details
append
Write entry to a new line in the log, with appropriate time stamp.- Parameters:
entry- A String containing a message to append to the log.
trimLog
private void trimLog()Drops the oldest lines once the log grows too long.fixEntry