8152465: Sjavac should not prefix server generated log messages with [server]
authoralundblad
Wed, 23 Mar 2016 13:44:53 +0100
changeset 36714 329f0f6baff5
parent 36713 592302b6161b
child 36715 ae6fa9280e0b
8152465: Sjavac should not prefix server generated log messages with [server] Summary: Dropped the [server] prefix unless debug output is enabled. Reviewed-by: jjg
langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/SjavacClient.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/SjavacClient.java	Wed Mar 23 13:39:15 2016 +0100
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/SjavacClient.java	Wed Mar 23 13:44:53 2016 +0100
@@ -139,7 +139,11 @@
                 String content = typeAndContent[1];
 
                 try {
-                    Log.log(Log.Level.valueOf(type), "[server] " + content);
+                    if (Log.isDebugging()) {
+                        // Distinguish server generated output if debugging.
+                        content = "[sjavac-server] " + content;
+                    }
+                    Log.log(Log.Level.valueOf(type), content);
                     continue;
                 } catch (IllegalArgumentException e) {
                     // Parsing of 'type' as log level failed.