logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: [SUBMIT] ServerSocketAppender.java
Date Thu, 07 Mar 2002 23:46:55 GMT
Hi March,

I finally get it. The SocketAppender/SocketServer combination is designed for
a setting with multiple log sources but one viewer. The ServertSocketAppender
is intended for situations with one log source but multiple viewers. Correct?

In the SocketAppender/SocketServer combination the SocketServer can be
configured to fan out input to multiple destinations based on a config file
placed on the SocketServer side but your approach is obviously more dynamic.

All in all, very cool. More comments inline.

At 17:14 06.03.2002 -0800, Mark Womack wrote:
>Enclosed is a new appender, ServerSocketAppender.java.  Please consider it
>for inclusion in the log4j project.  If there are concerns with the source
>or design, please let me know so I can correct them.
>ServerSocketAppender borrows heavily from the SocketAppender, and the code
>will look remarkably the same.  But instead of connecting to a remote
>socket, ServerSocketAppender creates a ServerSocket object and then accepts
>any number of connections by remote clients.  When a log event is to be
>appended, the event is sent to the set of current connections.


>If an error is encountered sending the event, the connection is 
>dropped.  No attempt is
>made to reconnect since it is the responsibility of the client to make the
>connection to begin with.

Makes sense.

>Why ServerSocketAppender?  If you have a group of developers accessing the
>same logging event source server, each one will need their own
>SocketAppender defined to pump log events to their client.  Add another
>developer, add another SocketAppender.  With ServerSocketAppender, you set
>up the appender once, let everyone know the port number and then have their
>clients connect to it when ever they want to.  It is always there, ready to
>send you log events.

The above paragraph was essential for my understanding.

>It also conserves socket ports since you only need one
>port instead of a port per SocketAppender.

Well... the total number of opened connected is identical in both 
Not an excessively strong argument imho.

>I am working on modifications to Chainsaw so that it can actively initiate
>connections with ServerSocketAppenders instead of only passively accept
>connections from SocketAppenders.  Then you could use it to connect to any
>number of sources.

Good. Let me know how it goes. Cheers, Ceki

ps: Thanks for the neat contribution by the way!

To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>

View raw message