Kevin,
I'm testing the code right now, but I made a couple of small additions to
your UDP code:
- Check if the InetAddress is a MulticastAddress. If so, create a
MulticastSocket instead and join
the group
- During cleanup, try and cast the DatagramSocket to a MulticastSocket. If
it works, leave the group.
- added an optional MulticastInterface configuration option in case there
are multiple interface cards in the computer
Source code is attached.
-Chris
----- Original Message -----
From: "Kevin Brown" <[EMAIL PROTECTED]>
To: "LOG4J Developers Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 28, 2001 2:36 AM
Subject: RE: New appender
> I needed a different kind of appender for my log4j implementation so I
> wrote one. This UDP appender is very similar to the SocketAppender except
> it uses
> UDP. What this allows me to do is monitor the logs on the local network
by
> simply listening to the appropriate port. This is very handy for
> monitoring type of applications where every packet is not necessarily
> essential.
>
> Source is attached and also available at:
> http://www.versatilesolutions.com/java/UDPAppender.java
>
> Kevin Brown
> [EMAIL PROTECTED]
>
----------------------------------------------------------------------------
----
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
UDPAppender.java
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]