From: jprocter Date: Thu, 31 Mar 2005 09:52:29 +0000 (+0000) Subject: added a an axis log4j appender property to the jalview.Cache. X-Git-Tag: Release_2_0~506 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7490127af372f38fe79963113ebc990f7e989255;p=jalview.git added a an axis log4j appender property to the jalview.Cache. --- diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index 5990616..7eaae62 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -26,7 +26,7 @@ public class Cache // FONT_NAME // FONT_STYLE // FONT_SIZE - + // logs.Axis.Level - one of the stringified Levels for log4j controlling the logging level for axis (used for web services) public static void loadProperties() { diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index c54a347..1c62825 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -63,7 +63,11 @@ public class Jalview extends JApplet private static void initLogger() { Logger l = Logger.getLogger("org.apache.axis"); - l.setLevel(Level.INFO); + if (Cache.getProperty("logs.Axis.Level")==null) { + Cache.setProperty("logs.Axis.Level", Level.INFO.toString()); + } + + l.setLevel(Level.toLevel(Cache.getProperty("logs.Axis.Level"))); ConsoleAppender ap = new ConsoleAppender(new SimpleLayout(),"System.err"); ap.setName("Axis"); l.addAppender(ap); @@ -74,7 +78,7 @@ public class Jalview extends JApplet try { initLogger(); } catch (Exception e) { - System.out.println("Failed to initialise the log4j system for axis\n"+e); + System.out.println("Problems initializing the log4j system\n"+e); } try{ UIManager.setLookAndFeel(