ch.qos.logback.core.net
Class SyslogWriter

java.lang.Object
  extended by java.io.Writer
      extended by ch.qos.logback.core.net.SyslogWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class SyslogWriter
extends java.io.Writer

SyslogWriter is a wrapper around the DatagramSocket class so that it behaves like a Writer.


Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
SyslogWriter(java.lang.String syslogHost, int port)
           
 
Method Summary
 void close()
           
 void flush()
           
 int getPort()
           
 void write(char[] charArray, int offset, int len)
           
 void write(java.lang.String str)
           
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyslogWriter

public SyslogWriter(java.lang.String syslogHost,
                    int port)
             throws java.net.UnknownHostException,
                    java.net.SocketException
Throws:
java.net.UnknownHostException
java.net.SocketException
Method Detail

write

public void write(char[] charArray,
                  int offset,
                  int len)
           throws java.io.IOException
Specified by:
write in class java.io.Writer
Throws:
java.io.IOException

write

public void write(java.lang.String str)
           throws java.io.IOException
Overrides:
write in class java.io.Writer
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Specified by:
flush in class java.io.Writer
Throws:
java.io.IOException

close

public void close()
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Writer

getPort

public int getPort()