|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.nukesoft.bot2.botutil.Log
The Log class is used for autonimous log maintnance. One file is created for each path given, regardless of the number of instances referenceing that file. File maintnance is done automaticaly, as are timed log flushes and timestamping. Log enteries from multiple instances are automaticaly interleved within the file.
Constructor Summary | |
Log(String logFileName)
Creates a Log object. |
Method Summary | |
void |
close()
Closes a log file and removes it from the auto flush table. |
void |
flush()
Manualy flushes this log file to disk. |
static void |
flushAll()
Manualy flushes all log files to disk. |
void |
logEntry(String entry)
Creates an entry in the log. |
static void |
setTimeBetweenFlushes(long timeBetweenFlushes)
Sets the time between global log flushes. |
static void |
setWorkingDirectory(String workingDirectory)
Sets the working directory for all logs. |
static void |
shutdown()
Properly shuts down the log service and flushes all files. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Log(String logFileName)
logFileName
- Path to the log file.Method Detail |
public void logEntry(String entry)
entry
- Text to add.public void flush()
public void close()
public static void flushAll()
public static void shutdown()
public static void setTimeBetweenFlushes(long timeBetweenFlushes)
timeBetweenFlushes
- The time in seconds. Zero (0) for manual flushing only.public static void setWorkingDirectory(String workingDirectory)
workingDirectory
- The directory path.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |