logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Hammer <carsten.ham...@t-online.de>
Subject how to use sawchain2?
Date Fri, 30 Jan 2004 22:24:18 GMT
Hi,
I tried to instantiate ChainsawCentral like this:

import java.awt.*;
import javax.swing.*;
import org.apache.log4j.chainsaw.plugins.*;

public class LoggingDialog extends JDialog {
   private JPanel panel1 = new JPanel();
   private BorderLayout borderLayout1 = new BorderLayout();
   private ChainsawCentral chainsaw = new 
org.apache.log4j.chainsaw.plugins.ChainsawCentral();


   public LoggingDialog(Frame frame, String title, boolean modal) {
     super(frame, title, modal);
     try {
       jbInit();
       pack();
     }
     catch(Exception ex) {
       ex.printStackTrace();
     }
   }

   public LoggingDialog() {
     this(null, "", false);
   }
   private void jbInit() throws Exception {

     panel1.setLayout(borderLayout1);
     getContentPane().add(panel1);
     panel1.add(chainsaw, BorderLayout.NORTH);

   }
}

Unfortunatly it does not work. I get the Dialog but there are no logs 
written to it.
I tried doing things like

BasicConfigurator.configure(new 
org.apache.log4j.chainsaw.ChainsawAppender());
org.apache.log4j.Logger.getRootLogger().addAppender(new 
org.apache.log4j.chainsaw.ChainsawAppender());

before and added a org.apache.log4j.netSocketAppender to my 
log4j.properties nothing helped.

This all using log4j-1.3alpha.jar and log4j-chainsaw-1.3alpha.jar.

Has anybody here been able to use chainsaw within a custom application?
How?
Best regards,
Carsten



---------------------------------------------------------------------
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