changeset 36708:c524ead121da

8151379: Sjavac should not print connection attempts on info logging level Summary: Changed logging level on some sjavac messages. Reviewed-by: jlahoda
author alundblad
date Tue, 22 Mar 2016 11:48:49 +0100
parents 317e0a03421a
children 77ddce18e3cc
files langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/JavacState.java langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/SjavacClient.java langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/SjavacServer.java
diffstat 3 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/JavacState.java	Thu Mar 17 12:40:04 2016 -0700
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/JavacState.java	Tue Mar 22 11:48:49 2016 +0100
@@ -361,22 +361,22 @@
             // Silently create a new javac_state file.
             noFileFound = true;
         } catch (IOException e) {
-            Log.info("Dropping old javac_state because of errors when reading it.");
+            Log.warn("Dropping old javac_state because of errors when reading it.");
             db = new JavacState(options, true);
             foundCorrectVerNr = true;
             newCommandLine = false;
             syntaxError = false;
     }
         if (foundCorrectVerNr == false && !noFileFound) {
-            Log.info("Dropping old javac_state since it is of an old version.");
+            Log.debug("Dropping old javac_state since it is of an old version.");
             db = new JavacState(options, true);
         } else
         if (newCommandLine == true && !noFileFound) {
-            Log.info("Dropping old javac_state since a new command line is used!");
+            Log.debug("Dropping old javac_state since a new command line is used!");
             db = new JavacState(options, true);
         } else
         if (syntaxError == true) {
-            Log.info("Dropping old javac_state since it contains syntax errors.");
+            Log.warn("Dropping old javac_state since it contains syntax errors.");
             db = new JavacState(options, true);
         }
         db.prev.calculateDependents();
@@ -868,7 +868,7 @@
                         // This is an incremental compile! The pubapi
                         // did change. Trigger recompilation of dependents.
                         packagesWithChangedPublicApis.add(pkg);
-                        Log.info("The API of " + Util.justPackageName(pkg) + " has changed!");
+                        Log.debug("The API of " + Util.justPackageName(pkg) + " has changed!");
                     }
                 }
             }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/SjavacClient.java	Thu Mar 17 12:40:04 2016 -0700
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/SjavacClient.java	Tue Mar 22 11:48:49 2016 +0100
@@ -172,7 +172,7 @@
         makeSureServerIsRunning(portFile);
         int attempt = 0;
         while (true) {
-            Log.info("Trying to connect. Attempt " + (++attempt) + " of " + MAX_CONNECT_ATTEMPTS);
+            Log.debug("Trying to connect. Attempt " + (++attempt) + " of " + MAX_CONNECT_ATTEMPTS);
             try {
                 return makeConnectionAttempt();
             } catch (IOException ex) {
@@ -191,7 +191,7 @@
         InetAddress localhost = InetAddress.getByName(null);
         InetSocketAddress address = new InetSocketAddress(localhost, portFile.getPort());
         socket.connect(address, CONNECTION_TIMEOUT);
-        Log.info("Connected");
+        Log.debug("Connected");
         return socket;
     }
 
@@ -238,7 +238,7 @@
               + ",keepalive="+ keepalive);
 
         Process serverProcess;
-        Log.info("Starting server. Command: " + String.join(" ", cmd));
+        Log.debug("Starting server. Command: " + String.join(" ", cmd));
         try {
             // If the cmd for some reason can't be executed (file is not found,
             // or is not executable for instance) this will throw an
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/SjavacServer.java	Thu Mar 17 12:40:04 2016 -0700
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/SjavacServer.java	Tue Mar 22 11:48:49 2016 +0100
@@ -165,7 +165,7 @@
             portFile.lock();
             portFile.getValues();
             if (portFile.containsPortInfo()) {
-                Log.info("Javac server not started because portfile exists!");
+                Log.debug("Javac server not started because portfile exists!");
                 portFile.unlock();
                 return -1;
             }
@@ -192,10 +192,10 @@
         portFileMonitor = new PortFileMonitor(portFile, this);
         portFileMonitor.start();
 
-        Log.info("Sjavac server started. Accepting connections...");
-        Log.info("    port: " + getPort());
-        Log.info("    time: " + new java.util.Date());
-        Log.info("    poolsize: " + poolsize);
+        Log.debug("Sjavac server started. Accepting connections...");
+        Log.debug("    port: " + getPort());
+        Log.debug("    time: " + new java.util.Date());
+        Log.debug("    poolsize: " + poolsize);
 
 
         keepAcceptingRequests.set(true);
@@ -208,7 +208,7 @@
             }
         } while (keepAcceptingRequests.get());
 
-        Log.info("Shutting down.");
+        Log.debug("Shutting down.");
 
         // No more connections accepted. If any client managed to connect after
         // the accept() was interrupted but before the server socket is closed
@@ -216,7 +216,7 @@
         // IOException on the client side.
 
         long realTime = System.currentTimeMillis() - serverStart;
-        Log.info("Total wall clock time " + realTime + "ms build time " + totalBuildTime + "ms");
+        Log.debug("Total wall clock time " + realTime + "ms build time " + totalBuildTime + "ms");
 
         // Shut down
         sjavac.shutdown();
@@ -231,7 +231,7 @@
             return;
         }
 
-        Log.info("Quitting: " + quitMsg);
+        Log.debug("Quitting: " + quitMsg);
 
         portFileMonitor.shutdown(); // No longer any need to monitor port file