Package com.mckoi.util
Class Log
- java.lang.Object
-
- com.mckoi.util.Log
-
public class Log extends java.lang.ObjectA log file/stream that logs some information generated by the system. This is intended to help with debugging. It safely handles concurrent output to the log.- Author:
- Tobias Downer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the log file.voidlog(java.lang.String text)Writes an entry to the log file.voidlogln(java.lang.String text)static LognullLog()Returns a Log that won't actually store a log.
-
-
-
Constructor Detail
-
Log
public Log(java.lang.String path) throws java.io.FileNotFoundException, java.io.IOException- Throws:
java.io.FileNotFoundExceptionjava.io.IOException
-
Log
public Log(java.io.File file, int size, int max_count) throws java.io.IOException- Throws:
java.io.IOException
-
Log
public Log(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException- Throws:
java.io.FileNotFoundExceptionjava.io.IOException
-
Log
protected Log()
-
-
Method Detail
-
log
public void log(java.lang.String text)
Writes an entry to the log file. The log file records the time the entry was put into the log, and the string which is the log.
-
logln
public void logln(java.lang.String text)
-
close
public void close()
Closes the log file.
-
nullLog
public static Log nullLog()
Returns a Log that won't actually store a log. This is useful for options where the user doesn't want anything logged.
-
-