com.huguesjohnson
Class LogFile

java.lang.Object
  extended by com.huguesjohnson.LogFile

public class LogFile
extends java.lang.Object

Extremely barebone implementation of a log file. It's not really pretty because it suppresses errors but also incredibly simple to use.


Constructor Summary
LogFile(java.lang.String fileName)
          Creates a new LogFile, dumps errors to the error console.
 
Method Summary
 void close()
          Flushes buffer and closes the log.
 void log(java.lang.String line)
          Appends a line to the log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogFile

public LogFile(java.lang.String fileName)
Creates a new LogFile, dumps errors to the error console.

Parameters:
fileName - Name & path of file to use. If the file directory doesn't exist it will be created.
Method Detail

close

public void close()
Flushes buffer and closes the log.


log

public void log(java.lang.String line)
Appends a line to the log.

Parameters:
line - The line to append.


Copyright © 2000-2007 Hugues Johnson