logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Womack <mwom...@bevocal.com>
Subject RE: Looking for help with SocketHubAppender and chainsaw
Date Tue, 10 Dec 2002 00:35:44 GMT
Lance,

The current version of Chainsaw in the log4j release does not support
SocketHubAppender, only SocketAppender.  The same is true of LF5 as well.

I have previously released some patches to Chainsaw that allow it to receive
events from both SocketAppender and SocketHubAppender.  Please see this
archived message:

http://marc.theaimsgroup.com/?l=log4j-dev&m=102511373124806&w=2

Let me know if you have problems accessing the zip file attachment to that
message.  I can resend it.

Since the posting of those patches I have started on modifications for log4j
v1.3 that will make them obsolete and it will make it much easier to
configure tools like Chainsaw and LF5 to receive events from remote
appenders without requiring major modifications everytime a new appender
type is created.  This is the set of Receiver plugins that have been
previously mentioned in passing.

I can talk a bit more on the subject if folks are interested.  But the above
patches will get you going with version 1.2.x.

let me know how it works out,
-Mark

> -----Original Message-----
> From: Lance Birtcil [mailto:Lance.Birtcil@cnet.com]
> Sent: Monday, December 09, 2002 4:09 PM
> To: 'log4j-user@jakarta.apache.org'
> Subject: Looking for help with SocketHubAppender and chainsaw
> 
> 
> Hi,
> 
> I'm having a little trouble finding documentation on how to 
> use a SocketHubAppender with chainsaw.  I've set up a servlet 
> in my webapp to handle logging and know that it is 
> functioning properly since various file appenders work ok.  I 
> also had success with the SocketAppender and chainsaw.
> 
> Here are some of the details regarding my configuration of my 
> log4j servlet:
> 
> 	# Available levels are DEBUG, INFO, WARN, ERROR, FATAL #
> 	# A is a DailyRollingFileAppender #
> 	log4j.rootCategory = DEBUG, A
> 
> 	log4j.appender.A = org.apache.log4j.DailyRollingFileAppender
> 	log4j.appender.A.file = logs/logfile.log
> 	log4j.appender.A.datePattern = '.'yyyy-MM-dd
> 	log4j.appender.A.append = true
> 	log4j.appender.A.layout = org.apache.log4j.PatternLayout
> 	log4j.appender.A.layout.ConversionPattern = [%d{EEE MMM 
> dd hh:mm:ss yyyy -zzz]} [%p] [%t] [%F:%L] %x %m%n
> 
> 
> 	# Configuration for Chainsaw
> 	log4j.rootCategory = DEBUG, Default, Chainsaw, Chainsaw2
> 
> 	log4j.appender.Default = 
> org.apache.log4j.DailyRollingFileAppender
> 	log4j.appender.Default.file = logs/logfile.xml
> 	log4j.appender.Default.layout = org.apache.log4j.xml.XMLLayout
> 	log4j.appender.Default.append = true
> 
> 	log4j.appender.Chainsaw = org.apache.log4j.net.SocketAppender
> 	log4j.appender.Chainsaw.remoteHost = 10.16.102.60
> 	log4j.appender.Chainsaw.port = 4445
> 	log4j.appender.Chainsaw.locationInfo = true
> 
> 	log4j.appender.Chainsaw2 = 
> org.apache.log4j.net.SocketHubAppender
> 	log4j.appender.Chainsaw2.port = 5555
> 	log4j.appender.Chainsaw2.locationInfo = true
> 
> 
> The Chainsaw Home Page shows how to set up a SocketAppender 
> and pass the port information on the command line, but there 
> is nothing that I can find about using SocketHubAppender:
> http://logui.sourceforge.net/
> 
> 	Usage
> 	The command line usage is:
> 
> 	  java -D<property>=<value> com.puppycrawl.tools.chainsaw.Main
> 
> 	The default behaviour of chainsaw can be changed by 
> setting system properties using the -D<property>=<value> 
> arguments to java. The following table 	describes what 
> properties can be set:
> 
> 	Property Description 
> 	chainsaw.port Indicates which port to listen for 
> connections on. Defaults to "4445". 
> 
> The following is the command-line that I use to start up 
> chainsaw, and the resulting log messages that chainsaw sends 
> to the console:
> 
> 	[~]$ /usr/local/depot/j2sdk1.3.1_04/bin/java -classpath 
> /home/lanceb/xcvs/HEAD/java/lib/log4j-	
> 1.2.3.jar:/home/lanceb/xcvs/HEAD/java/lib/crimson.jar 
> -Dchainsaw.port=5555 -Dchainsaw.host=somehost.cnet.com 
> org.apache.log4j.chainsaw.Main
> 
> 	Warning: Cannot convert string 
> "<Key>Escape,_Key_Cancel" to type VirtualBinding
> 	Warning: Cannot convert string "<Key>Home,_Key_Begin" 
> to type VirtualBinding
> 	Warning: Cannot convert string "<Key>F1,_Key_Help" to 
> type VirtualBinding
> 	Warning: Cannot convert string 
> "Shift<Key>F10,_Key_Menu" to type VirtualBinding
> 	Warning: Cannot convert string 
> "<Key>F10,Shift_Key_Menu" to type VirtualBinding
> 	Warning: Cannot convert string 
> "<Key>KP_Enter,_Key_Execute" to type VirtualBinding
> 	Warning: Cannot convert string 
> "Alt<Key>Return,Alt_Key_KP_Enter" to type VirtualBinding
> 	[main] DEBUG org.apache.log4j.chainsaw.MyTableModel - 
> Total time [ms]: 0 in update, size: 0
> 	[Thread-1] INFO 
> org.apache.log4j.chainsaw.LoggingReceiver - Thread started
> 	[Thread-1] DEBUG 
> org.apache.log4j.chainsaw.LoggingReceiver - Waiting for a connection
> 
> I never seem to get any messages in the Chainsaw UI.
> 
> So a few questions:
> 
> 1) Which options do I need to pass through the JVM on 
> chainsaw startup?  The Chainsaw homepage shows chainsaw.port 
> as the only *valid* property, but I would think that the host 
> where the SocketHubAppender is running would also be necessary.
> 
> 2) Why does chainsaw not display any log entries and 
> seemingly wait on 'Waiting for a connection' forever?
> 
> All help is appreciated!
> 
> Thanks,
> --LB 
> 
> ------------------------------------------------------- 
> Lance Birtcil 
> Software Engineer -- Ad Production 
> CNET Networks
> 
> --
> To unsubscribe, e-mail:   
<mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

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


Mime
View raw message