com.go.trove.log
Class LogEventParsingWriter
java.lang.Object
|
+--java.io.Writer
|
+--com.go.trove.log.LogEventParsingWriter
- public class LogEventParsingWriter
- extends java.io.Writer
LogEventParsingWriter parses the data written to it and converts it
to LogEvent objects. Add a LogListener to intercept LogEvents. Events are
parsed based on newline characters (LF, CRLF or CR) or a switch to a
different thread.
- Version:
- 14 , 9/07/00
- Author:
- Brian S O'Neill
| Fields inherited from class java.io.Writer |
lock |
| Methods inherited from class java.io.Writer |
write, write, write, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogEventParsingWriter
public LogEventParsingWriter(Log source,
int type)
- Parameters:
source - Source object to create events with.type - Type of events to create.
LogEventParsingWriter
public LogEventParsingWriter(Log source,
int type,
java.lang.Object lock)
- Parameters:
source - Source object to create events with.type - Type of events to create.lock - Synchronization lock.
addLogListener
public void addLogListener(LogListener listener)
removeLogListener
public void removeLogListener(LogListener listener)
write
public void write(char[] array,
int off,
int len)
throws java.io.IOException
- Overrides:
write in class java.io.Writer
flush
public void flush()
throws java.io.IOException
- Overrides:
flush in class java.io.Writer
close
public void close()
throws java.io.IOException
- Overrides:
close in class java.io.Writer
isEnabled
public boolean isEnabled()
- Returning false discards written data, and events are not generated.
Default implementation always returns true.