|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.util.EventLog
public class EventLog
Simple event logger for occasional events, with caching for reads. Does not keep the file open.
Field Summary | |
---|---|
static String |
ABORTED
for convenience, not required |
static String |
BECAME_FLOODFILL
|
static String |
CHANGE_IP
|
static String |
CHANGE_PORT
|
static String |
CLOCK_SHIFT
|
static String |
CRASHED
|
static String |
CRITICAL
|
static String |
INSTALL_FAILED
|
static String |
INSTALLED
|
static String |
NETWORK
|
static String |
NEW_IDENT
|
static String |
NOT_FLOODFILL
|
static String |
OOM
|
static String |
REACHABILITY
|
static String |
REKEYED
|
static String |
RESEED
|
static String |
SOFT_RESTART
|
static String |
STARTED
|
static String |
STOPPED
|
static String |
UPDATED
|
static String |
WATCHDOG
|
Constructor Summary | |
---|---|
EventLog(I2PAppContext ctx,
File file)
|
Method Summary | |
---|---|
void |
addEvent(String event)
Append an event. |
void |
addEvent(String event,
String info)
Append an event. |
SortedMap<Long,String> |
getEvents(long since)
All events since a given time. |
SortedMap<Long,String> |
getEvents(String event,
long since)
Caches. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ABORTED
public static final String BECAME_FLOODFILL
public static final String CHANGE_IP
public static final String CHANGE_PORT
public static final String CLOCK_SHIFT
public static final String CRASHED
public static final String CRITICAL
public static final String INSTALLED
public static final String INSTALL_FAILED
public static final String NETWORK
public static final String NEW_IDENT
public static final String NOT_FLOODFILL
public static final String OOM
public static final String REACHABILITY
public static final String REKEYED
public static final String RESEED
public static final String SOFT_RESTART
public static final String STARTED
public static final String STOPPED
public static final String UPDATED
public static final String WATCHDOG
Constructor Detail |
---|
public EventLog(I2PAppContext ctx, File file)
file
- should be absoluteMethod Detail |
---|
public void addEvent(String event)
event
- no spaces, e.g. "started"
IllegalArgumentException
- if event contains a space or newlinepublic void addEvent(String event, String info)
event
- no spaces or newlines, e.g. "started"info
- no newlines, may be blank or null
IllegalArgumentException
- if event contains a space or either contains a newlinepublic SortedMap<Long,String> getEvents(String event, long since)
event
- matching this event only, case sensitivesince
- since this time, 0 for all
public SortedMap<Long,String> getEvents(long since)
since
- since this time, 0 for all
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |