logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Creating a SocketReceiver in log4j 1.2.15
Date Sat, 09 Jun 2007 23:02:25 GMT
I'll take a shot at the ones I know off the top of my head


On Jun 9, 2007, at 5:18 PM, Steve Souza wrote:

> I am interested in creating a Server for log4j that receives logging
> messages from any multiple other servers (other servers are remote  
> jvm's
> that are also running log4j).  Sort of a centralized logging  
> receiver, that
> will
> 1) Use JAMon to track counts of logging messages by server and by  
> level (see
> http://jamonapi.sourceforge.net/log4j_jamonappender.html for screen
> snapshots of the single server version of this),
> 2) Allow me to look at the most recent log messages by server via a  
> web page
> (sort of like tailing the various servers).
>
> It is unclear to me how to proceed.  I think I should be able to  
> use the
> SocketReceiver and install the JAMonAppender on this server and do  
> a proof
> of concept fairly easily.  A couple questions
>
> 1) Is this the purpose of a SocketReceiver?  How does this differ  
> from the
> SocketHubReceiver?

The receivers (based on their javadoc) appear to serve the same  
purpose, but only vary on what appender they are expecting on the  
sending side.  The difference between SocketAppender and  
SocketHubAppender is that SocketAppender sends to an configured  
destination and SocketHubAppender sends to any client who registers  
an interest.  For your use case, I would expect that  
SocketHubAppender and SocketHubReceiver would be the best combination.


> 2) Can this 1.2.15 SocketReceiver class receive log messages from  
> ealier
> versions of log4j such as 1.2.14?

The receivers would break if the serialized form of LoggingEvent was  
incompatible.  There are tests that check whether the current code  
base can deserialize LoggingEvents serialized with older versions,  
but I don't recall specifically what version of log4j was used to  
generate the original serialized form.  I suspect it was log4j 1.2.8.



> 3) Can I run a SocketReciever in the jvm of a web server such as  
> Tomcat.
> This would give me the ability to display any of the messages sent  
> to it via
> a web page which would be handy.


> 4) Is there any good documentation on ways to create a Server, and  
> if not is
> there any sample code?



> 5) Is this the location for the latest version of log4j?  (One  
> comment is
> that it would be nice to have a log4j page explaining the various  
> links that
> all seem to have code, and what the purpose of each is)
> http://people.apache.org/builds/logging/log4j/1.2.15/
>

Anything on people.apache.org are nightly builds or release  
candidates and are not intended for general availability or use.   To  
actually release something we have to have a place to put release  
candidates for the development community to provide feedback before  
calling for a vote to actually publish a release on www.apache.org/ 
dist.  Anything on people.apache.org is subject to disappear or be  
updated at any time.  Anything on www.apache.org/dist is archived for  
posterity.  Things on people.apache.org are announced on a  
development mailing list only since the content is only intended for  
developers.

The latest released version of log4j is 1.2.14.  Any log4j 1.2.15  
release candidate is experimental.  We've had more than the typical  
number of release candidates for log4j 1.2.15 due to the switch from  
an Ant to Maven based build.




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message