Hi Michael,

When defining system properties on the command line there is no space between the -D 
and the property name (so you need -Dchainsaw.port=4445). By putting a space in, the 
JVM is looking for a class called "chainsaw.port=4445" which it obviously can't find, 
hence the error message.

Keith


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: 17 March 2003 10:10
To: Log4J Users List
Subject: RE: log4j with chainsaw



Hi Paul

Thanks for your reply.

I have tried what you said except i get this message on the console:

C:\Java\jakarta-log4j-1.2.8\dist\lib>java -D chainsaw.port=4445
org.apache.log4j
.chainsaw.Main
Exception in thread "main" java.lang.NoClassDefFoundError:
chainsaw/port=4445


(I type the java -D chainsaw.port=4445 org.apache.log4j.chainsaw.Main )


I am in the directory with the log4j.jar file inside.  Am i doing this
correctly???????

Sorry if this sounds very silly, but i am a very new user to Java & log4j.


- Michael



                                                                                       
                                               
                      Paul Smith                                                       
                                               
                      <[EMAIL PROTECTED]        To:       'Log4J Users List' <[EMAIL 
PROTECTED]>                           
                      x.com.au>                cc:                                     
                                               
                                               Subject:  RE: log4j with chainsaw       
                                               
                      13/03/2003 21:27                                                 
                                               
                      Please respond to                                                
                                               
                      "Log4J Users                                                     
                                               
                      List"                                                            
                                               
                                                                                       
                                               
                                                                                       
                                               




> Where can i find an example, of using chainsaw app?????
> I am using xml config and output.  Ceki's book doesn't mention much on
> chainsaw to view XML logs.  I just want to see how it would look etc..

Hi Michael,

Here's a property file for the app that I want to remote via logs via
chainsaw:

# This logger catches everything else that is getting logged.
log4j.rootCategory=DEBUG, ChainSaw

log4j.appender.ChainSaw=org.apache.log4j.net.SocketAppender
log4j.appender.ChainSaw.RemoteHost=localhost
log4j.appender.ChainSaw.Port=4445
log4j.appender.ChainSaw.LocationInfo=true
log4j.appender.ChainSaw.ReconnectionDelay=5000

[end property file]

I don't think a layout is required (might even be the cause of the issue).

When chainsaw starts up, it will start listening on a default port of 4445,
and if the SocketAppender on the remote side doesn't immediately connect to
Chainsaw it will give up forever without the ReconnectionDelay parameter
setting.

If this doesn't work, try starting Chainsaw using "java" rather than
"javaw"
to see any Chainsaw specific log outputs about connections etc.

Hope this helps.

cheers,

Paul Smith

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to