You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/01/04 11:20:17 UTC

[GitHub] geertjanw closed pull request #353: GlobFileBuiltQuery was logging things at INFO that were not meant to be

geertjanw closed pull request #353: GlobFileBuiltQuery was logging things at INFO that were not meant to be
URL: https://github.com/apache/incubator-netbeans/pull/353
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/project.ant/src/org/netbeans/spi/project/support/ant/GlobFileBuiltQuery.java b/project.ant/src/org/netbeans/spi/project/support/ant/GlobFileBuiltQuery.java
index a857febcd..eea3bdbe1 100644
--- a/project.ant/src/org/netbeans/spi/project/support/ant/GlobFileBuiltQuery.java
+++ b/project.ant/src/org/netbeans/spi/project/support/ant/GlobFileBuiltQuery.java
@@ -119,8 +119,8 @@ public GlobFileBuiltQuery(AntProjectHelper helper, PropertyEvaluator eval, Strin
     private File findTarget(FileObject file) {
         File sourceF = FileUtil.toFile(file);
         if (sourceF == null) {
-            if (LOG.isLoggable(Level.INFO)) {
-                LOG.log(Level.INFO, "Not a disk file: {0}", file);
+            if (LOG.isLoggable(Level.FINE)) {
+                LOG.log(Level.FINE, "Not a disk file: {0}", file);
             }
             return null;
         }
@@ -128,15 +128,15 @@ private File findTarget(FileObject file) {
         for (int i = 0; i < fromPrefixes.length; i++) {
             String prefixEval = eval.evaluate(fromPrefixes[i]);
             if (prefixEval == null) {
-                if (LOG.isLoggable(Level.INFO)) {
-                    LOG.log(Level.INFO, "{0} evaluates to null", fromPrefixes[i]);
+                if (LOG.isLoggable(Level.FINE)) {
+                    LOG.log(Level.FINE, "{0} evaluates to null", fromPrefixes[i]);
                 }
                 continue;
             }
             String suffixEval = eval.evaluate(fromSuffixes[i]);
             if (suffixEval == null) {
-                if (LOG.isLoggable(Level.INFO)) {
-                    LOG.log(Level.INFO, "{0} evaluates to null", fromSuffixes[i]);
+                if (LOG.isLoggable(Level.FINE)) {
+                    LOG.log(Level.FINE, "{0} evaluates to null", fromSuffixes[i]);
                 }
                 continue;
             }
@@ -155,26 +155,26 @@ private File findTarget(FileObject file) {
             String particular = remainder.substring(0, remainder.length() - suffixEval.length());
             String toPrefixEval = eval.evaluate(toPrefixes[i]);
             if (toPrefixEval == null) {
-                if (LOG.isLoggable(Level.INFO)) {
-                    LOG.log(Level.INFO, "{0} evaluates to null", toPrefixes[i]);
+                if (LOG.isLoggable(Level.FINE)) {
+                    LOG.log(Level.FINE, "{0} evaluates to null", toPrefixes[i]);
                 }
                 continue;
             }
             String toSuffixEval = eval.evaluate(toSuffixes[i]);
             if (toSuffixEval == null) {
-                if (LOG.isLoggable(Level.INFO)) {
-                    LOG.log(Level.INFO, "{0} evaluates to null", toSuffixes[i]);
+                if (LOG.isLoggable(Level.FINE)) {
+                    LOG.log(Level.FINE, "{0} evaluates to null", toSuffixes[i]);
                 }
                 continue;
             }
             File target = helper.resolveFile(toPrefixEval + particular + toSuffixEval);
-            if (LOG.isLoggable(Level.INFO)) {
-                LOG.log(Level.INFO, "Found target for {0}: {1}", new Object[]{source, target});
+            if (LOG.isLoggable(Level.FINE)) {
+                LOG.log(Level.FINE, "Found target for {0}: {1}", new Object[]{source, target});
             }
             return target;
         }
-        if (LOG.isLoggable(Level.INFO)) {
-            LOG.log(Level.INFO, "No match for path {0} among {1} {2}", new Object[]{source, Arrays.asList(fromPrefixes), Arrays.asList(fromSuffixes)});
+        if (LOG.isLoggable(Level.FINE)) {
+            LOG.log(Level.FINE, "No match for path {0} among {1} {2}", new Object[]{source, Arrays.asList(fromPrefixes), Arrays.asList(fromSuffixes)});
         }
         return null;
     }
@@ -239,8 +239,8 @@ private StatusImpl createStatus(FileObject file) {
                     doFire = true;
                 }
                 built = Boolean.valueOf(b);
-                if (LOG.isLoggable(Level.INFO)) {
-                    LOG.log(Level.INFO, "isBuilt: {0} from {1}", new Object[]{b, this});
+                if (LOG.isLoggable(Level.FINE)) {
+                    LOG.log(Level.FINE, "isBuilt: {0} from {1}", new Object[]{b, this});
                 }
             }
             if (doFire) {
@@ -251,20 +251,20 @@ private StatusImpl createStatus(FileObject file) {
         
         private boolean isReallyBuilt() {
             if (!source.isValid()) {
-                if (LOG.isLoggable(Level.INFO)) {
-                    LOG.log(Level.INFO, "invalid: {0}", this);
+                if (LOG.isLoggable(Level.FINE)) {
+                    LOG.log(Level.FINE, "invalid: {0}", this);
                 }
                 return false; // whatever
             }
             if (source.isModified()) {
-                if (LOG.isLoggable(Level.INFO)) {
-                    LOG.log(Level.INFO, "modified: {0}", this);
+                if (LOG.isLoggable(Level.FINE)) {
+                    LOG.log(Level.FINE, "modified: {0}", this);
                 }
                 return false;
             }
             if (target == null) {
-                if (LOG.isLoggable(Level.INFO)) {
-                    LOG.log(Level.INFO, "no target matching {0}", this);
+                if (LOG.isLoggable(Level.FINE)) {
+                    LOG.log(Level.FINE, "no target matching {0}", this);
                 }
                 return false;
             }
@@ -273,8 +273,8 @@ private boolean isReallyBuilt() {
             if (targetTime >= sourceTime) {
                 return true;
             } else {
-                if (LOG.isLoggable(Level.INFO)) {
-                    LOG.log(Level.INFO, "out of date (target: {0} vs. source: {1}): {2}", new Object[]{targetTime, sourceTime, this});
+                if (LOG.isLoggable(Level.FINE)) {
+                    LOG.log(Level.FINE, "out of date (target: {0} vs. source: {1}): {2}", new Object[]{targetTime, sourceTime, this});
                 }
                 return false;
             }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists