geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/scanner DeploymentScanner.java
Date Tue, 12 Aug 2003 23:14:45 GMT
jboynes     2003/08/12 16:14:45

  Modified:    modules/core/src/java/org/apache/geronimo/deployment/scanner
                        DeploymentScanner.java
  Log:
  Drop scan messages to trace level and wrap with flag
  
  Revision  Changes    Path
  1.5       +10 -5     incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/scanner/DeploymentScanner.java
  
  Index: DeploymentScanner.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/scanner/DeploymentScanner.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DeploymentScanner.java	11 Aug 2003 21:27:18 -0000	1.4
  +++ DeploymentScanner.java	12 Aug 2003 23:14:45 -0000	1.5
  @@ -75,8 +75,7 @@
   
   /**
    * An MBean that maintains a list of URLs and periodically invokes a Scanner
  - * to search them for deployments. The set found is sent out as a JMX
  - * Notifiction.
  + * to search them for deployments.
    *
    *
    * @version $Revision$ $Date$
  @@ -175,15 +174,21 @@
       }
   
       public synchronized void scanNow() {
  +        boolean logTrace = log.isTraceEnabled();
  +
           Set results = new HashSet();
           for (Iterator i = scanners.entrySet().iterator(); i.hasNext();) {
               Map.Entry entry = (Map.Entry) i.next();
               URL url = (URL) entry.getKey();
  -            log.debug("Starting scan of " + url);
  +            if (logTrace) {
  +                log.trace("Starting scan of " + url);
  +            }
               Scanner scanner = (Scanner) entry.getValue();
               try {
                   Set result = scanner.scan();
  -                log.debug("Finished scan of " + url + ", " + result.size() + " deployment(s)
found");
  +                if (logTrace) {
  +                    log.trace("Finished scan of " + url + ", " + result.size() + " deployment(s)
found");
  +                }
                   results.addAll(result);
               } catch (IOException e) {
                   log.error("Error scanning url " + url, e);
  
  
  

Mime
View raw message