summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/list/util.lst2
-rw-r--r--sources/scala/tools/scalac/Main.scala6
-rw-r--r--sources/scala/tools/scaladoc/Main.scala6
-rw-r--r--sources/scala/tools/scalai/Interpreter.java6
-rw-r--r--sources/scala/tools/scalai/InterpreterShell.java5
-rw-r--r--sources/scala/tools/scalai/Main.java5
-rw-r--r--sources/scala/tools/util/AbstractReporter.java144
-rw-r--r--sources/scala/tools/util/ConsoleReporter.java169
-rw-r--r--sources/scala/tools/util/Reporter.java241
-rw-r--r--sources/scala/tools/util/ReporterTimer.java2
-rw-r--r--sources/scalac/CompilerCommand.java10
-rw-r--r--sources/scalac/Global.java8
12 files changed, 373 insertions, 231 deletions
diff --git a/config/list/util.lst b/config/list/util.lst
index 05f8560728..67a1fe81ba 100644
--- a/config/list/util.lst
+++ b/config/list/util.lst
@@ -5,10 +5,12 @@
AbstractFile.java
AbstractFileReader.java
+AbstractReporter.java
AbstractTimer.java
ByteArrayFile.java
CharArrayFile.java
ClassPath.java
+ConsoleReporter.java
DirectoryPath.java
DummyTimer.java
EmptyIterator.java
diff --git a/sources/scala/tools/scalac/Main.scala b/sources/scala/tools/scalac/Main.scala
index bcd94be4ce..5e54b968bb 100644
--- a/sources/scala/tools/scalac/Main.scala
+++ b/sources/scala/tools/scalac/Main.scala
@@ -6,7 +6,7 @@
** $Id$
\* */
-import scala.tools.util.Reporter;
+import scala.tools.util.ConsoleReporter;
import scalac.{CompilerCommand, Global => scalac_Global};
import scalac.symtab.classfile.CLRTypes;
@@ -28,7 +28,7 @@ object Main {
def main(args: Array[String]): unit = main1( true, args );
def main1( exitOnError:boolean, args: Array[String] ):unit = {
- val reporter = new Reporter();
+ val reporter = new ConsoleReporter();
val command = new CompilerCommand(
PRODUCT, VERSION, reporter, new CompilerPhases());
var ok = true;
@@ -48,7 +48,7 @@ object Main {
if (reporter.errors() == 0)
if (!global.PHASE.CODEGEN.hasSkipFlag()) global.dump(units);
timer.stop("total");
- global.reporter.printSummary();
+ reporter.printSummary();
}
}
if( exitOnError ) {
diff --git a/sources/scala/tools/scaladoc/Main.scala b/sources/scala/tools/scaladoc/Main.scala
index f72a9c0819..f05b86fd84 100644
--- a/sources/scala/tools/scaladoc/Main.scala
+++ b/sources/scala/tools/scaladoc/Main.scala
@@ -8,7 +8,7 @@
import scalac.{Global => scalac_Global};
import scala.tools.scalac.{Global, CompilerPhases};
-import scala.tools.util.Reporter;
+import scala.tools.util.ConsoleReporter;
package scala.tools.scaladoc {
@@ -27,7 +27,7 @@ object Main {
System.getProperty("scala.version", "1.0");
def main(args: Array[String]): Unit = {
- val reporter = new Reporter();
+ val reporter = new ConsoleReporter();
val phases = new CompilerPhases(); {
// we skip all phases between ANALYZER and TERMINAL.
val array = phases.phases();
@@ -52,7 +52,7 @@ object Main {
}
generator.apply();
}
- global.reporter.printSummary();
+ reporter.printSummary();
}
// System.exit(if (reporter.errors() > 0) 1 else 0);
}
diff --git a/sources/scala/tools/scalai/Interpreter.java b/sources/scala/tools/scalai/Interpreter.java
index 22187887e9..669793fa78 100644
--- a/sources/scala/tools/scalai/Interpreter.java
+++ b/sources/scala/tools/scalai/Interpreter.java
@@ -95,9 +95,11 @@ public class Interpreter {
private EvaluatorResult interpret(CompilationUnit[] units,
boolean interactive)
{
+ compiler.compile(units);
+ int errors = global.reporter.errors();
+ global.reporter.resetCounters();
+ if (errors != 0) return EvaluatorResult.Void;
try {
- if (global.reporter.errors() != 0) return EvaluatorResult.Void;
- compiler.compile(units);
if (interactive) {
Variable console = compiler.getModule(global.console);
evaluator.evaluate(console);
diff --git a/sources/scala/tools/scalai/InterpreterShell.java b/sources/scala/tools/scalai/InterpreterShell.java
index 59fb135ecf..e57830b1e0 100644
--- a/sources/scala/tools/scalai/InterpreterShell.java
+++ b/sources/scala/tools/scalai/InterpreterShell.java
@@ -93,10 +93,7 @@ public class InterpreterShell {
if (files.length > 0) load(lfiles = files);
if (global.reporter.errors() == 0 && script != null) eval(script);
if (global.reporter.errors() == 0 && main != null) call(main, args);
- if (interactive)
- loop();
- else
- global.reporter.printSummary();
+ if (interactive) loop();
}
public void loop() {
diff --git a/sources/scala/tools/scalai/Main.java b/sources/scala/tools/scalai/Main.java
index b2dc69827c..7be8114235 100644
--- a/sources/scala/tools/scalai/Main.java
+++ b/sources/scala/tools/scalai/Main.java
@@ -10,7 +10,7 @@
package scala.tools.scalai;
import scala.tools.scalac.CompilerPhases$class;
-import scala.tools.util.Reporter;
+import scala.tools.util.ConsoleReporter;
public class Main {
@@ -26,13 +26,14 @@ public class Main {
// Public Methods
public static void main(String[] args) {
- Reporter reporter = new Reporter();
+ ConsoleReporter reporter = new ConsoleReporter();
InterpreterCommand command = new InterpreterCommand(
PRODUCT, VERSION, reporter, new CompilerPhases$class());
if (command.parse(args)) {
InterpreterShell shell = new InterpreterShell(command);
shell.main(command.files.toArray(), command.script.value,
command.program.main, command.program.args);
+ reporter.printSummary();
}
System.exit((reporter.errors() > 0) ? 1 : 0);
}
diff --git a/sources/scala/tools/util/AbstractReporter.java b/sources/scala/tools/util/AbstractReporter.java
new file mode 100644
index 0000000000..19b1eacbef
--- /dev/null
+++ b/sources/scala/tools/util/AbstractReporter.java
@@ -0,0 +1,144 @@
+/* ____ ____ ____ ____ ______ *\
+** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala **
+** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL **
+** /_____/\____/\___/\____/____/ **
+\* */
+
+// $Id$
+
+package scala.tools.util;
+
+import java.util.HashSet;
+
+/**
+ * This abstract class implements most aspects of a Reporter, only how
+ * things are displayed has to be implemented in subclasses.
+ */
+public abstract class AbstractReporter implements Reporter {
+
+ //########################################################################
+ // Private Fields
+
+ /** Log of error positions (used to avoid printing errors twice) */
+ private final HashSet positions;
+
+ /** Whether information messages should be issued */
+ private boolean verbose;
+ /** Whether warnings should be issued */
+ private boolean nowarn;
+ /** Whether a prompt should be displayed after errors and warnings */
+ private boolean prompt;
+
+ /** Number of warning issued totally */
+ private int warnings;
+ /** Number of errors issued totally */
+ private int errors;
+
+ //########################################################################
+ // Public Constructors
+
+ /** Initializes a new instance. */
+ public AbstractReporter() {
+ this.positions = new HashSet();
+ this.verbose = false;
+ this.nowarn = false;
+ this.prompt = false;
+ this.warnings = 0;
+ this.errors = 0;
+ }
+
+ //########################################################################
+ // Public Methods - Display
+
+ /** Displays the information. The position may be null. */
+ public abstract void displayInfo(Position position, String message);
+
+ /** Displays the warning. The position may be null. */
+ public abstract void displayWarning(Position position, String message);
+
+ /** Displays the error. The position may be null. */
+ public abstract void displayError(Position position, String message);
+
+ /** Displays a prompt. */
+ public abstract void displayPrompt();
+
+ //########################################################################
+ // Public Methods - Flags
+
+ public boolean verbose() {
+ return verbose;
+ }
+
+ public boolean nowarn() {
+ return nowarn;
+ }
+
+ public boolean prompt() {
+ return prompt;
+ }
+
+
+ public void verbose(boolean verbose) {
+ this.verbose = verbose;
+ }
+
+ public void nowarn(boolean nowarn) {
+ this.nowarn = nowarn;
+ }
+
+ public void prompt(boolean prompt) {
+ this.prompt = prompt;
+ }
+
+ //########################################################################
+ // Public Methods - Count
+
+ public int warnings() {
+ return warnings;
+ }
+
+ public int errors() {
+ return errors;
+ }
+
+ public void resetCounters() {
+ errors = 0;
+ warnings = 0;
+ }
+
+ //########################################################################
+ // Public Methods - Report
+
+ public void info(Position position, String message, boolean force) {
+ if (force || verbose) displayInfo(null, message);
+ }
+
+ public void warning(Position position, String message) {
+ boolean hidden = testAndLog(position);
+ if (nowarn) return;
+ if (!hidden || prompt) displayWarning(position, message);
+ if (!hidden) warnings++;
+ if (prompt) displayPrompt();
+ }
+
+ public void error(Position position, String message) {
+ boolean hidden = testAndLog(position);
+ if (!hidden || prompt) displayError(position, message);
+ if (!hidden) errors++;
+ if (prompt) displayPrompt();
+ }
+
+ //########################################################################
+ // Private Methods
+
+ /** Logs a position and returns true if it was already logged. */
+ private boolean testAndLog(Position position) {
+ if (position == null) return false;
+ if (position.getColumnNumber() == 0) return false;
+ if (positions.contains(position)) return true;
+ positions.add(position);
+ return false;
+ }
+
+ //########################################################################
+}
diff --git a/sources/scala/tools/util/ConsoleReporter.java b/sources/scala/tools/util/ConsoleReporter.java
new file mode 100644
index 0000000000..7abcc06bf9
--- /dev/null
+++ b/sources/scala/tools/util/ConsoleReporter.java
@@ -0,0 +1,169 @@
+/* ____ ____ ____ ____ ______ *\
+** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala **
+** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL **
+** /_____/\____/\___/\____/____/ **
+\* */
+
+// $Id$
+
+package scala.tools.util;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import scala.tools.util.debug.Debug;
+
+/**
+ * This class implements a Reporter that displays messages on a text
+ * console.
+ */
+public class ConsoleReporter extends AbstractReporter {
+
+ //########################################################################
+ // Private Fields
+
+ /** The reader to ask for failures on demand */
+ private final BufferedReader reader;
+ /** The writer to print messages */
+ private final PrintWriter writer;
+
+ //########################################################################
+ // Public Fields
+
+ /** Whether a short file name should be displayed before errors */
+ public boolean shortname;
+
+ //########################################################################
+ // Public Constructors
+
+ /** Initializes a new instance. */
+ public ConsoleReporter() {
+ this(
+ new BufferedReader(new InputStreamReader(System.in)),
+ new PrintWriter(System.err, true));
+ }
+
+ /** Initializes a new instance. */
+ public ConsoleReporter(BufferedReader reader, PrintWriter writer) {
+ this.reader = reader;
+ this.writer = writer;
+ }
+
+ //########################################################################
+ // Public Methods - Count
+
+ /** Returns the number of errors issued totally as a string */
+ public String getErrorCountString() {
+ return getCountString(errors(), "error");
+ }
+
+ /** Returns the number of warnings issued totally as a string */
+ public String getWarningCountString() {
+ return getCountString(warnings(), "warning");
+ }
+
+ /** Returns a string meaning "n elements". */
+ public String getCountString(int n, String elements) {
+ switch (n) {
+ case 0: return "no " + elements + "s";
+ case 1: return "one " + elements;
+ case 2: return "two " + elements + "s";
+ case 3: return "three " + elements + "s";
+ case 4: return "four " + elements + "s";
+ default: return n + " " + elements + "s";
+ }
+ }
+
+ //########################################################################
+ // Public Methods - Print
+
+ /** Prints the message. */
+ public void printMessage(String message) {
+ writer.println(message);
+ }
+
+ /** Prints the message with the given position indication. */
+ public void printMessage(Position position, String message) {
+ if (position != null) {
+ message = " " + message;
+ if (position.getLineNumber() != 0)
+ message = position.getLineNumber() + ":" + message;
+ if (shortname)
+ message = position.getName() + ":" + message;
+ else
+ message = position.getPath() + ":" + message;
+ }
+ printMessage(message);
+ printSourceLine(position);
+ }
+
+ /** Prints the warning message. */
+ public void printWarning(Position position, String message) {
+ message = "warning: " + message;
+ printMessage(position, message);
+ }
+
+ /** Prints the error message. */
+ public void printError(Position position, String message) {
+ if (position == null) message = "error: " + message;
+ printMessage(position, message);
+ }
+
+ /** Prints the source line of the given position. */
+ public void printSourceLine(Position position) {
+ String line = position == null ? null : position.getLineContent();
+ if (line == null) return;
+ printMessage(line);
+ printColumnMarker(position);
+ }
+
+ /** Prints the column marker of the given position. */
+ public void printColumnMarker(Position position) {
+ int column = position == null ? 0 : position.getColumnNumber();
+ StringBuffer buffer = new StringBuffer(column);
+ for (int i = 1; i < column; i++) buffer.append(' ');
+ if (column > 0) buffer.append('^');
+ printMessage(buffer.toString());
+ }
+
+ /** Prints the number of errors and warnings if their are non-zero. */
+ public void printSummary() {
+ if (warnings() > 0) printMessage(getWarningCountString() + " found");
+ if (errors() > 0) printMessage(getErrorCountString() + " found");
+ }
+
+ //########################################################################
+ // Public Methods - Display
+
+ public void displayInfo(Position position, String message) {
+ printMessage(position, message);
+ }
+
+ public void displayWarning(Position position, String message) {
+ printWarning(position, message);
+ }
+
+ public void displayError(Position position, String message) {
+ printError(position, message);
+ }
+
+ public void displayPrompt() {
+ try {
+ while (true) {
+ writer.print("r)esume, a)bort: ");
+ writer.flush();
+ String line = reader.readLine();
+ if (line == null) continue; else line = line.toLowerCase();
+ if ("abort".startsWith(line))
+ throw new Error("user abort");
+ if ("resume".startsWith(line)) return;
+ }
+ } catch (IOException e) {
+ Debug.abort("input read error");
+ }
+ }
+
+ //########################################################################
+}
diff --git a/sources/scala/tools/util/Reporter.java b/sources/scala/tools/util/Reporter.java
index 5db584133b..b2411e0649 100644
--- a/sources/scala/tools/util/Reporter.java
+++ b/sources/scala/tools/util/Reporter.java
@@ -8,230 +8,55 @@
package scala.tools.util;
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.HashSet;
-
-import scala.tools.util.debug.Debug;
-
-public class Reporter {
+/**
+ * This interface provides methods to issue information, warning and
+ * error messages.
+ */
+public interface Reporter {
//########################################################################
- // Private Fields
-
- /** The reader to ask for failures on demand */
- private final BufferedReader reader;
- /** The writer to print messages */
- private final PrintWriter writer;
-
- /** Log of error positions (used to avoid printing errors twice) */
- private final HashSet positions;
+ // Public Methods - Flags
- /** Number of errors issued totally */
- private int errors;
- /** Number of warning issued totally */
- private int warnings;
+ /** Are information messages issued? */
+ public boolean verbose();
+ /** Are warnings issued? */
+ public boolean nowarn();
+ /** Is a prompt displayed after errors and warnings? */
+ public boolean prompt();
- //########################################################################
- // Public Fields
-
- /** Whether warnings should be issued */
- public boolean nowarn;
- /** Whether information messages should be issued */
- public boolean verbose;
- /** Whether a prompt should be displayed after errors and warnings */
- public boolean prompt;
- /** Whether a short file name should be displayed before errors */
- public boolean shortname;
-
- //########################################################################
- // Public Constructors
-
- /** Initializes a new instance. */
- public Reporter() {
- this(
- new BufferedReader(new InputStreamReader(System.in)),
- new PrintWriter(System.err, true));
- }
-
- /** Initializes a new instance. */
- public Reporter(BufferedReader reader, PrintWriter writer) {
- this.reader = reader;
- this.writer = writer;
- this.positions = new HashSet();
- this.prompt = false;
- this.nowarn = false;
- this.verbose = false;
- this.errors = 0;
- }
+ /** Sets whether information messages are issued. */
+ public void verbose(boolean verbose);
+ /** Sets whether warnings are issued. */
+ public void nowarn(boolean nowarn);
+ /** Sets whether a prompt is displayed after errors and warnings. */
+ public void prompt(boolean prompt);
//########################################################################
// Public Methods - Count
- /** Returns the number of errors issued totally */
- public int errors() {
- return errors;
- }
-
- /** Returns the number of warnings issued totally */
- public int warnings() {
- return warnings;
- }
-
- /** Returns the number of errors issued totally as a string */
- public String getErrorCountString() {
- return getCountString(errors, "error");
- }
+ /** Returns the number of warnings issued. */
+ public int warnings();
- /** Returns the number of warnings issued totally as a string */
- public String getWarningCountString() {
- return getCountString(warnings, "warning");
- }
+ /** Returns the number of errors issued. */
+ public int errors();
- /** Returns a string meaning "n elements". */
- public String getCountString(int n, String elements) {
- switch (n) {
- case 0: return "no " + elements + "s";
- case 1: return "one " + elements;
- case 2: return "two " + elements + "s";
- case 3: return "three " + elements + "s";
- case 4: return "four " + elements + "s";
- default: return n + " " + elements + "s";
- }
- }
-
- /** Resets all counters */
- public void resetCounters() {
- errors = 0;
- warnings = 0;
- }
+ /** Resets all counters. */
+ public void resetCounters();
//########################################################################
// Public Methods - Report
- /** Issues a message */
- public void report(String message) {
- printMessage(message);
- }
-
- /** Issues a message */
- public void inform(String message) {
- if (verbose) printMessage(message);
- }
-
- /** Issues an error */
- public void error(Position position, String message) {
- boolean hidden = testAndLog(position);
- if (!hidden || prompt) printError(position, message);
- if (!hidden) errors++;
- if (prompt) failOnDemand();
- }
+ /**
+ * Issues an information. The position may be null. If force is
+ * true, the message is displayed even in non-verbose mode.
+ */
+ public void info(Position position, String message, boolean force);
- /** Issues a warning */
- public void warning(Position position, String message) {
- boolean hidden = testAndLog(position);
- if (nowarn) return;
- if (!hidden || prompt) printWarning(position, message);
- if (!hidden) warnings++;
- if (prompt) failOnDemand();
- }
-
- //########################################################################
- // Public Methods - Print
-
- /** Prints the message. */
- public void printMessage(String message) {
- writer.println(message);
- }
-
- /** Prints the message with the given position indication. */
- public void printMessage(Position position, String message) {
- if (position != null) {
- message = " " + message;
- if (position.getLineNumber() != 0)
- message = position.getLineNumber() + ":" + message;
- if (shortname)
- message = position.getName() + ":" + message;
- else
- message = position.getPath() + ":" + message;
- }
- printMessage(message);
- printSourceLine(position);
- }
-
- /** Prints the error message. */
- public void printError(Position position, String message) {
- if (position == null) message = "error: " + message;
- printMessage(position, message);
- }
-
- /** Prints the warning message. */
- public void printWarning(Position position, String message) {
- message = "warning: " + message;
- printMessage(position, message);
- }
-
- /** Prints the number of errors and warnings if their are non-zero. */
- public void printSummary() {
- if (errors() > 0) report(getErrorCountString() + " found");
- if (warnings() > 0) report(getWarningCountString() + " found");
- }
-
- /** Prints the source line of the given position. */
- public void printSourceLine(Position position) {
- String line = position == null ? null : position.getLineContent();
- if (line == null) return;
- printMessage(line);
- printColumnMarker(position);
- }
-
- /** Prints the column marker of the given position. */
- public void printColumnMarker(Position position) {
- int column = position == null ? 0 : position.getColumnNumber();
- StringBuffer buffer = new StringBuffer(column);
- for (int i = 1; i < column; i++) buffer.append(' ');
- if (column > 0) buffer.append('^');
- printMessage(buffer.toString());
- }
-
- //########################################################################
- // Public Methods - Fail on demand
-
- /** Fails only if requested. */
- public void failOnDemand() {
- failOnDemand("user abort");
- }
-
- /** Fails only if requested. */
- public void failOnDemand(String message) {
- try {
- while (true) {
- writer.print("r)esume, a)bort: ");
- writer.flush();
- String line = reader.readLine();
- if (line == null) continue; else line = line.toLowerCase();
- if ("abort".startsWith(line))
- throw new Error(message);
- if ("resume".startsWith(line)) return;
- }
- } catch (IOException e) {
- Debug.abort("input read error");
- }
- }
-
- //########################################################################
- // Private Methods
+ /** Issues a warning. The position may be null. */
+ public void warning(Position position, String message);
- /** Logs a position and returns true if it was already logged. */
- private boolean testAndLog(Position position) {
- if (position == null) return false;
- if (position.getColumnNumber() == 0) return false;
- if (positions.contains(position)) return true;
- positions.add(position);
- return false;
- }
+ /** Issues an error. The position may be null. */
+ public void error(Position position, String message);
//########################################################################
}
diff --git a/sources/scala/tools/util/ReporterTimer.java b/sources/scala/tools/util/ReporterTimer.java
index 77e91d290d..174f349305 100644
--- a/sources/scala/tools/util/ReporterTimer.java
+++ b/sources/scala/tools/util/ReporterTimer.java
@@ -32,7 +32,7 @@ public class ReporterTimer extends AbstractTimer {
/** Issues a timing information (duration in milliseconds). */
public void issue(String message, long duration) {
- reporter.inform("[" + message + " in " + duration + "ms]");
+ reporter.info(null, "[" + message + " in " + duration + "ms]", false);
}
//########################################################################
diff --git a/sources/scalac/CompilerCommand.java b/sources/scalac/CompilerCommand.java
index d2e244b271..03089f1d49 100644
--- a/sources/scalac/CompilerCommand.java
+++ b/sources/scalac/CompilerCommand.java
@@ -14,6 +14,7 @@ import java.util.List;
import scala.tools.util.ClassPath;
import scala.tools.util.Reporter;
+import scala.tools.util.ConsoleReporter;
import scalac.util.CommandParser;
import scalac.util.ArgumentParser;
@@ -305,10 +306,11 @@ public class CompilerCommand extends CommandParser {
*/
public boolean parse(String[] args) {
boolean result = super.parse(args);
- reporter().nowarn = nowarn.value;
- reporter().verbose = verbose.value;
- reporter().prompt = prompt.value;
- reporter().shortname = Xshortname.value;
+ reporter().verbose(verbose.value);
+ reporter().nowarn(nowarn.value);
+ reporter().prompt(prompt.value);
+ if (reporter() instanceof ConsoleReporter)
+ ((ConsoleReporter)reporter()).shortname = Xshortname.value;
return result;
}
diff --git a/sources/scalac/Global.java b/sources/scalac/Global.java
index 8d220bfdc5..ead3469865 100644
--- a/sources/scalac/Global.java
+++ b/sources/scalac/Global.java
@@ -190,7 +190,7 @@ public abstract class Global {
};
public static Timer getTimer(Reporter reporter) {
- return reporter.verbose
+ return reporter.verbose()
? (Timer)new ReporterTimer(reporter)
: (Timer)DummyTimer.object;
}
@@ -229,7 +229,7 @@ public abstract class Global {
this.printtypes = args.types.value;
this.printtokens = args.print.tokens;
this.classPath = args.classpath();
- if (reporter.verbose) reporter.inform("classpath = " + classPath);
+ reporter.info(null, "classpath = " + classPath, false);
this.outpath = args.outpath();
String encoding = args.encoding.value;
Charset charset = null;
@@ -632,7 +632,7 @@ public abstract class Global {
/** issue an operation note
*/
public void operation(String message) {
- reporter.inform("[" + message + "]");
+ reporter.info(null, "[" + message + "]", false);
}
/** issue a debug message from currentPhase
@@ -640,7 +640,7 @@ public abstract class Global {
// the boolean return value is here to let one write "assert log( ... )"
public boolean log(String message) {
if (log()) {
- reporter.report("[log " + currentPhase + "] " + message);
+ reporter.info(null, "[log " + currentPhase + "] " + message, true);
}
return true;
}