org.tranche.server.logs
Class LogWriter

java.lang.Object
  extended by org.tranche.server.logs.LogWriter

public class LogWriter
extends java.lang.Object

Class for creating a simple log writer that writes log entries out to a file.

Author:
Bryan E. Smith - bryanesmith@gmail.com

Constructor Summary
LogWriter(java.io.File logFile)
          Create a log writer with a file to write log entries out to.
 
Method Summary
 void close()
          Closes the logging stream
 void writeEntry(LogEntry entry)
          Write an a LogEntry to the log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogWriter

public LogWriter(java.io.File logFile)
          throws java.lang.Exception
Create a log writer with a file to write log entries out to.

Parameters:
logFile -
Throws:
java.lang.Exception
Method Detail

writeEntry

public void writeEntry(LogEntry entry)
                throws java.lang.Exception
Write an a LogEntry to the log.

Parameters:
entry -
Throws:
java.lang.Exception

close

public void close()
           throws java.lang.Exception
Closes the logging stream

Throws:
java.lang.Exception


This code is free for use both commercially and non-commercially as stated in the project's license