[Swift-commit] cog r3845

swift at ci.uchicago.edu swift at ci.uchicago.edu
Wed Nov 27 12:50:05 CST 2013


------------------------------------------------------------------------
r3845 | davidkelly999 | 2013-11-27 12:45:03 -0600 (Wed, 27 Nov 2013) | 2 lines

Disable log4j for coaster-client to get rid of some of the noise

------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/client/CoasterClient.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/client/CoasterClient.java	(revision 3844)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/client/CoasterClient.java	(working copy)
@@ -11,6 +11,7 @@
 
 import java.io.IOException;
 import java.util.List;
+import java.util.Collections;
 
 import org.globus.cog.abstraction.coaster.service.local.LocalRequestManager;
 import org.globus.cog.abstraction.impl.execution.coaster.WorkerShellCommand;
@@ -21,11 +22,20 @@
 import org.globus.cog.coaster.commands.Command;
 import org.globus.cog.coaster.commands.Command.Callback;
 import org.globus.cog.coaster.commands.InfoCommand;
+import org.apache.log4j.Logger;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Level;
 
 public class CoasterClient implements Callback {
     private String url;
     
     public CoasterClient(String url) {
+       List<Logger> loggers = Collections.<Logger>list(LogManager.getCurrentLoggers());
+       loggers.add(LogManager.getRootLogger());
+       for ( Logger logger : loggers ) {
+          logger.setLevel(Level.OFF);
+       }
+
         this.url = url;
     }
     



More information about the Swift-commit mailing list