]> source.dussan.org Git - aspectj.git/commitdiff
first half of Andrew Huff's patch for 59636 (-log option not producing output - shoul...
authoracolyer <acolyer>
Wed, 20 Apr 2005 12:56:07 +0000 (12:56 +0000)
committeracolyer <acolyer>
Wed, 20 Apr 2005 12:56:07 +0000 (12:56 +0000)
org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java

index 0cfa6103f95d8e92696e154c35b87f7a05a25998..56aaaef5a8b32730cc8e368d810d7b0f0fdcf70a 100644 (file)
@@ -551,6 +551,28 @@ public class Main {
         }
     }
     
+       public static class LogModeMessagePrinter extends MessagePrinter {
+        
+               protected final PrintStream logStream;
+           public LogModeMessagePrinter(boolean verbose, PrintStream logStream) {
+            super(verbose);
+                       this.logStream = logStream;
+        }
+               
+               protected PrintStream getStreamFor(IMessage.Kind kind) {
+                   if (IMessage.WARNING.isSameOrLessThan(kind)) {
+                return logStream;
+            } else if (verbose && IMessage.INFO.equals(kind)) {
+                return logStream;
+            } else if (IMessage.WEAVEINFO.equals(kind)) {
+               return logStream;
+            } else {
+                return null;
+            }
+        }
+               
+       }
+       
     /** controller for repeatable command delays until input or file changed or removed */
     public static class CommandController {
         public static String TAG_FILE_OPTION = "-XincrementalFile";