[Swift-commit] r5766 - trunk/src/org/griphyn/vdl/karajan

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Sat Apr 28 20:40:37 CDT 2012


Author: hategan
Date: 2012-04-28 20:40:37 -0500 (Sat, 28 Apr 2012)
New Revision: 5766

Modified:
   trunk/src/org/griphyn/vdl/karajan/Loader.java
Log:
set root level to WARN if minimal logging is in effect to avoid unnecessary calls to logging statements as well as the resulting parameter manipulations

Modified: trunk/src/org/griphyn/vdl/karajan/Loader.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/Loader.java	2012-04-27 22:31:12 UTC (rev 5765)
+++ trunk/src/org/griphyn/vdl/karajan/Loader.java	2012-04-29 01:40:37 UTC (rev 5766)
@@ -98,7 +98,9 @@
     public static String buildVersion;
 
     public static void main(String[] argv) {
-        logger.debug("Swift started");
+        if (logger.isDebugEnabled()) {
+            logger.debug("Swift started");
+        }
         ArgumentParser ap = buildArgumentParser();
         String project = null;
         try {
@@ -432,7 +434,9 @@
             String name = e.getKey();
             if (ap.isPresent(name)) {
             	String value = ap.getStringValue(name);
-            	logger.debug("setting: " + name + " to: " + value);
+            	if (logger.isDebugEnabled()) {
+            	    logger.debug("setting: " + name + " to: " + value);
+            	}
             	config.setProperty(name, value);
             }
         }
@@ -572,7 +576,7 @@
             ca.setThreshold(Level.FATAL);
         }
         else if (ap.isPresent(ARG_MINIMAL_LOGGING)) {
-            fa.setThreshold(Level.WARN);
+            Logger.getRootLogger().setLevel(Level.WARN);
         }
         else if (ap.isPresent(ARG_REDUCED_LOGGING)) {
             Logger.getLogger(AbstractDataNode.class).setLevel(Level.WARN);




More information about the Swift-commit mailing list