From 78490c105c783b17efc538957b4fe475e7887bf7 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 30 Mar 2005 17:15:20 +0000 Subject: [PATCH] fixed the log4j messages. --- src/jalview/bin/Jalview.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 237d91f..c54a347 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -14,6 +14,7 @@ import javax.swing.*; import java.awt.event.*; import jalview.io.*; +import org.apache.log4j.*; public class Jalview extends JApplet { @@ -60,10 +61,21 @@ public class Jalview extends JApplet frame.setVisible(false); } + private static void initLogger() { + Logger l = Logger.getLogger("org.apache.axis"); + l.setLevel(Level.INFO); + ConsoleAppender ap = new ConsoleAppender(new SimpleLayout(),"System.err"); + ap.setName("Axis"); + l.addAppender(ap); + } public static void main(String[] args) { Cache.loadProperties(); - + try { + initLogger(); + } catch (Exception e) { + System.out.println("Failed to initialise the log4j system for axis\n"+e); + } try{ UIManager.setLookAndFeel( // "javax.swing.plaf.metal.MetalLookAndFeel" -- 1.7.10.2