de.matthias_burbach.mosaique.core.util
Class LineBufferLog

java.lang.Object
  extended byde.matthias_burbach.mosaique.core.util.LineBufferLog
All Implemented Interfaces:
Log

public class LineBufferLog
extends java.lang.Object
implements Log

Is a log implementation which keeps lines buffered in an internal memory buffer until they are requested to be written to a file.

Author:
Matthias Burbach

Field Summary
 
Fields inherited from interface de.matthias_burbach.mosaique.core.util.Log
SEVERITY_ERROR, SEVERITY_INFO, SEVERITY_WARNING
 
Constructor Summary
LineBufferLog()
           
 
Method Summary
 void log(java.lang.String severity, java.lang.String message)
          
 void writeToFile(java.lang.String fileName)
          Writes the lines logged so far to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineBufferLog

public LineBufferLog()
Method Detail

log

public void log(java.lang.String severity,
                java.lang.String message)

Specified by:
log in interface Log
Parameters:
severity - One of Log.SEVERITY_INFO, Log.SEVERITY_WARNING, Log.SEVERITY_ERROR.
message - The message to log.

writeToFile

public void writeToFile(java.lang.String fileName)
Writes the lines logged so far to a file. Lines logged will be deleted from the internal buffer.

Parameters:
fileName - The absolute path and name of the file to write to.


Copyright © 2005-2006 . All Rights Reserved.