Hi Nicko,
Thanks for your answer.
> > So I wonder if you guys could create a TCP appender? I guess many
> > people would love that, too :-)
>
> We already have 2 TCP appenders - but maybe they are not what
> you want.
>
> The RemotingAppender can be configured to use TCP. This
> allows LoggingEvent objects to be sent over a TCP connection
> and reconstituted on the target machine.
Oh, that sounds interesting. Since my first thought was "TCP is more
stable than UDP" I haven't looked in this direction. Anyway, I like
that idea because it should rather easy to implement (and I don't have
to deploy a custom appender).
Today I am trying to get a more stable version of my log viewer using
the remoting appender.
> The TelnetAppender listens for TCP connections. This allows
> the log viewer to connect into the application to receive log
> messages. This is an inversion of the normal way of logging
> in that the app doing the logging does not send the messages
> anywhere until a viewer actually connects to it. This method
> is nice for the application because it doesn't have to do any
> work when there are no viewers connected to it.
>
> As far as writing something that operates like the
> UdpAppender but uses TCP instead, it should be simple to get
> something working using a socket. It is a little more complex
> when you start thinking about how to maintain the connection
> and reconnect. log4j uses a separate thread to attempt to
> reconnect every few seconds, which seems to be a reasonable
> approach. It is worth noting that doing something like this
> means that the appender (and hence the application hosting
> it) will be polling a log view server every few seconds. If
> this server is only periodically active then the application
> may be doing a lot of work for nothing.
Good point. I will try consider this but actually, we don't care
about performance at all. Our applications are mainly server sided
database-based applications. Logging is by default disabled or
strongly limited. The UdpAppender, RemotingAppender or somthing like
that is only enabled for debugging (due to the lack of remote debugging).
Regards,
Immo Landwerth
Software Developer
__________________________________
The Project Group GmbH
- your project experts. -
Neherstraße 9
81675 München
Fon +49 (89) 61 55 93 - 51
Fax +49 (89) 61 55 93 - 40
[EMAIL PROTECTED]
http://www.TheProjectGroup.de
__________________________________