I am specifically looking for the most up to date, modern SysLogHandler
for java.util.logging
.
I have found a few that date back to 2001 - 2003, mostly un-supported now.
I know that syslog
is a pretty static service, I am wondering before I write something myself, if there are any newer handler implementations that support the Java 1.5 and newer features.
I am not interested in any of the other logging frameworks or wrapper / proxy libraries.
I am not looking for SLF4J or any other alternative logging frameworks, as suggested in this question.
I met same problem - I was need a Syslog extension class for java.util.logging.Handler
After searching in Internet without any success, I ended up creating my own implementation - http://code.google.com/p/agafua-syslog/ with support of UDP and TCP protocols. I use it in production project.
In an old job, I used the Syslog4j library and wired up a custom Log4j-appender for it, so you can probably do something similar by implementing a custom java.util.logging.Handler
that passes messages along.
Syslog (at least on Linux) listens on a UDP port for input (514/udp by default).
So implement a Handler which sends the formatted messages to this port. I used the existing SocketHandler for reference, and implemented an alterative around a DatagramSocket. Mine came to about 200 lines all-in.