fixed the log4j messages.
authorjprocter <Jim Procter>
Wed, 30 Mar 2005 17:15:20 +0000 (17:15 +0000)
committerjprocter <Jim Procter>
Wed, 30 Mar 2005 17:15:20 +0000 (17:15 +0000)
src/jalview/bin/Jalview.java

index 237d91f..c54a347 100755 (executable)
@@ -14,6 +14,7 @@ import javax.swing.*;
 import java.awt.event.*;\r
 import jalview.io.*;\r
 \r
+import org.apache.log4j.*;\r
 \r
 public class Jalview extends JApplet\r
 {\r
@@ -60,10 +61,21 @@ public class Jalview extends JApplet
     frame.setVisible(false);\r
   }\r
 \r
+  private static void initLogger() {\r
+    Logger l = Logger.getLogger("org.apache.axis");\r
+    l.setLevel(Level.INFO);\r
+    ConsoleAppender ap = new ConsoleAppender(new SimpleLayout(),"System.err");\r
+    ap.setName("Axis");\r
+    l.addAppender(ap);\r
+  }\r
    public static void main(String[] args) {\r
 \r
     Cache.loadProperties();\r
-\r
+    try {\r
+      initLogger();\r
+    } catch (Exception e) {\r
+      System.out.println("Failed to initialise the log4j system for axis\n"+e);\r
+    }\r
     try{\r
        UIManager.setLookAndFeel(\r
    //   "javax.swing.plaf.metal.MetalLookAndFeel"\r