User: ejort   
  Date: 02/02/09 08:09:25

  Modified:    src/main/org/jboss/util Executor.java
  Log:
  Guarded info logging. Faster when not interested in life-cycle logging
  
  Revision  Changes    Path
  1.9       +6 -3      jboss/src/main/org/jboss/util/Executor.java
  
  Index: Executor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/util/Executor.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Executor.java     26 Nov 2001 03:19:46 -0000      1.8
  +++ Executor.java     9 Feb 2002 16:09:25 -0000       1.9
  @@ -19,7 +19,7 @@
    *      
    *   @see <related>
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Rickard Öberg</a>.
  - *   @version $Revision: 1.8 $
  + *   @version $Revision: 1.9 $
    */
   public class Executor
      implements ExecutorMBean, MBeanRegistration
  @@ -43,7 +43,9 @@
      public ObjectName preRegister(MBeanServer server, ObjectName name)
         throws java.lang.Exception
      {
  -      log.info("Execute:"+exec);
  +      boolean infoEnabled = log.isInfoEnabled();
  +      if (infoEnabled)
  +         log.info("Execute:"+exec);
         Process p = Runtime.getRuntime().exec(exec);
         
         p.getErrorStream().close();
  @@ -53,7 +55,8 @@
            log.info(line);
         
         p.waitFor();
  -      log.info("Done");
  +      if (infoEnabled)
  +         log.info("Done");
            
         return new ObjectName(OBJECT_NAME);
      }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to