You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Oliver Pike <Ol...@hyperion.com> on 2005/06/14 06:30:23 UTC

Help with setting up chainsaw with log4j

I'm working with an application that uses log4j as its logging mechanism
and I want to use Chainsaw. It comes bundled with log4j.jar. I can't
find a log4j.properties anywhere with the application, but within
log4j.jar there's a file, defaultconfig.properties whose contents are:

 

# For the general syntax of property based configuration files see the

# documenation of org.apache.log4j.PropertyConfigurator.

 

# The root category uses the appender called A1. Since no priority is

# specified, the root category assumes the default priority for root

# which is DEBUG in log4j. The root category is the only category that

# has a default priority. All other categories need not be assigned a

# priority in which case they inherit their priority from the

# hierarchy.

 

log4j.rootCategory=, A1

 

# A1 is set to be a LogMonitorAppender which outputs to a swing

# logging console. 

  

log4j.appender.A1=org.apache.log4j.lf5.LF5Appender

 

 

I'm guessing I need to make some changes to this file?

 

Thanks,

Ollie

 


Re: Help with setting up chainsaw with log4j

Posted by Paul Smith <ps...@aconex.com>.
Chainsaw within the log4j 1.2.x series can be started by following  
the instructions here:

http://logging.apache.org/log4j/docs/api/org/apache/log4j/chainsaw/ 
package-summary.html

The new version 2 of Chainsaw can be started via Java Webstart:

http://logging.apache.org/log4j/docs/webstart/chainsaw/ 
chainsawWebStart.jnlp

Check here for more information on the new version of Chainsaw (you  
can download a standalone bundle of it if you want):

http://logging.apache.org/log4j/docs/chainsaw.html

Configuration of Chainsaw v2 is relatively simple, if you setup your  
remote application appender as follows:

log4j.rootLogger=DEBUG, CHAINSAW_CLIENT

log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender
log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost
log4j.appender.CHAINSAW_CLIENT.Port=4445

(this assumes you're debugging locally, using localhost as the  
location to broadcast to, you can use a SocketHubAppender in the  
reverse fashion with multiple Chainsaw clients able to connect to the  
same application)

Then start Chainsaw v2, it should pop up and ask if you want to start  
a Receiver, choose a matching SocketReceiver (or SocketHubAppender)  
and the correct port, and you should be ok.

Just watch out for the different version of log4j.  Chainsaw v2 uses  
the new log4j 1.3 Alpha code-base, and the LocationInfo from a log4j  
1.2.x series application has some oddities.

Hope that helps.

cheers,

Paul Smith

On 14/06/2005, at 2:30 PM, Oliver Pike wrote:

> I'm working with an application that uses log4j as its logging  
> mechanism
> and I want to use Chainsaw. It comes bundled with log4j.jar. I can't
> find a log4j.properties anywhere with the application, but within
> log4j.jar there's a file, defaultconfig.properties whose contents are:
>
>
>
> # For the general syntax of property based configuration files see the
>
> # documenation of org.apache.log4j.PropertyConfigurator.
>
>
>
> # The root category uses the appender called A1. Since no priority is
>
> # specified, the root category assumes the default priority for root
>
> # which is DEBUG in log4j. The root category is the only category that
>
> # has a default priority. All other categories need not be assigned a
>
> # priority in which case they inherit their priority from the
>
> # hierarchy.
>
>
>
> log4j.rootCategory=, A1
>
>
>
> # A1 is set to be a LogMonitorAppender which outputs to a swing
>
> # logging console.
>
>
>
> log4j.appender.A1=org.apache.log4j.lf5.LF5Appender
>
>
>
>
>
> I'm guessing I need to make some changes to this file?
>
>
>
> Thanks,
>
> Ollie
>
>
>
>


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