Logback API
Version 0.9.8

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:
Closeable, Flushable, Appendable

public class SyslogWriter
extends 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(String syslogHost, int port)
           
 
Method Summary
 void close()
           
 void flush()
           
 int getPort()
           
 void write(char[] charArray, int offset, int len)
           
 void write(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(String syslogHost,
                    int port)
             throws UnknownHostException,
                    SocketException
Throws:
UnknownHostException
SocketException
Method Detail

write

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

write

public void write(String str)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

flush

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

close

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

getPort

public int getPort()

Logback API
Version 0.9.8

Copyright © 2005-2008 QOS.ch. All Rights Reserved.