org.log5j.writer
Class SocketWriter

java.lang.Object
  extended by org.log5j.Writer
      extended by org.log5j.writer.SocketWriter

public final class SocketWriter
extends Writer

SocketWriter writes log messages to a TCP socket.

SocketWriter requires two configuration properties to be set;

Author:
Bruce Ashton

Constructor Summary
SocketWriter(Format format, java.util.Properties properties)
          Create a new SocketWriter and connect.
 
Method Summary
 void write(java.lang.String message)
          Write a single message to the log.
 
Methods inherited from class org.log5j.Writer
getFormat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketWriter

public SocketWriter(Format format,
                    java.util.Properties properties)
             throws java.io.IOException
Create a new SocketWriter and connect.

Parameters:
format - the Format object for this SocketWriter
properties - configuration properties for this SocketWriter.
Throws:
java.io.IOException - if the socket cannot be opened for writing
Method Detail

write

public void write(java.lang.String message)
Description copied from class: Writer
Write a single message to the log.

Specified by:
write in class Writer
Parameters:
message - the message to write