• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Log4J and Chainsaw v2

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have been developing a program that uses log4j logging to the console.
I now want to use Chainsaw v2 to view/filter the log4j messages and I am not sure where to start or what to do!

The current log4j.properties files contains...
## Log4j SETTINGS ###########################################

log4j.additivity.com=FALSE

log4j.rootLogger=WARN,CONSOLE
log4j.logger.com=WARN,CONSOLE

log4j.logger.com.th.tr.ctadmin.CtuAdminProg=TRACE
log4j.logger.com.th.tr.ctadmin.LocalCtu=TRACE

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
#log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
#log4j.appender.CONSOLE.layout.ConversionPattern=%d{mm:ss} %-5p %-12t %-23C{1} #%-3L %-20M %m%n

##############################################
... do I have to convert this to an XML file or can I keep it as a properties file?

I have included the jmdns.jar & the log4j-zeroconf.jar in the java build path.

Also each time I run the Chainsaw v2 batch file I am confronted by the "warning you have no receivers defined..." question. Which option should I choose?

I think it is fairly obvious from the above I am in desparate need of an idiots guide to getting chainsaw running! Any suggestions???

Thanks
Steve.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need something like the following in your log4j.properties file:


Make sure to start the Chainsaw GUI before the app that does the logging.
 
reply
    Bookmark Topic Watch Topic
  • New Topic