Holger's
Java API

com.antelmann.util.logging
Class StringBufferLog

java.lang.Object
  extended by com.antelmann.util.logging.AbstractLogWriter<String>
      extended by com.antelmann.util.logging.StringBufferLog
All Implemented Interfaces:
Filter<LogEntry>, LogWriter

public class StringBufferLog
extends AbstractLogWriter<String>

StringBufferLog writes log messages into a StringBuffer.

Author:
Holger Antelmann

Field Summary
protected  StringBuffer buffer
           
 
Fields inherited from class com.antelmann.util.logging.AbstractLogWriter
filter
 
Constructor Summary
StringBufferLog()
           
StringBufferLog(LogEntryFormatter<String> formatter)
           
StringBufferLog(StringBuffer buffer)
          uses a StringLineFormatter
StringBufferLog(StringBuffer buffer, LogEntryFormatter<String> formatter)
           
 
Method Summary
 StringBuffer getStringBuffer()
           
 void writeLogPattern(String pattern)
          writes the pattern to the log entity.
 
Methods inherited from class com.antelmann.util.logging.AbstractLogWriter
accept, getLogFilter, getLogFormatter, setLogFilter, setLogFormatter, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

protected StringBuffer buffer
Constructor Detail

StringBufferLog

public StringBufferLog()

StringBufferLog

public StringBufferLog(LogEntryFormatter<String> formatter)

StringBufferLog

public StringBufferLog(StringBuffer buffer)
uses a StringLineFormatter

See Also:
StringLineFormatter

StringBufferLog

public StringBufferLog(StringBuffer buffer,
                       LogEntryFormatter<String> formatter)
Method Detail

getStringBuffer

public StringBuffer getStringBuffer()

writeLogPattern

public void writeLogPattern(String pattern)
Description copied from class: AbstractLogWriter
writes the pattern to the log entity. If the LogEntryFormatter is null, the pattern is the LogEntry object itself; otherwise, the pattern is the result of formatting the LogEntry with the given LogEntryFormatter.

Specified by:
writeLogPattern in class AbstractLogWriter<String>


(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads