Skip to content

Commit 2d0f4a8

Browse files
committed
8332113: Update nsk.share.Log to be always verbose
Reviewed-by: sspitsyn, cjplummer
1 parent 89e5d98 commit 2d0f4a8

File tree

1 file changed

+6
-10
lines changed
  • test/hotspot/jtreg/vmTestbase/nsk/share

1 file changed

+6
-10
lines changed

test/hotspot/jtreg/vmTestbase/nsk/share/Log.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ public class Log {
7474

7575
/**
7676
* Is log-mode verbose?
77-
* Default value is <code>false</code>.
77+
* Always enabled.
7878
*/
79-
private boolean verbose = false;
79+
private final boolean verbose = true;
8080

8181
/**
8282
* Should log messages prefixed with timestamps?
83-
* Default value is <code>false</code>.
83+
* Always enabled.
8484
*/
85-
private boolean timestamp = false;
85+
private final boolean timestamp = true;
8686

8787
/**
8888
* Names for trace levels
@@ -193,7 +193,6 @@ public Log(PrintStream stream) {
193193
*/
194194
public Log(PrintStream stream, boolean verbose) {
195195
this(stream);
196-
this.verbose = verbose;
197196
}
198197

199198
/**
@@ -204,7 +203,6 @@ public Log(PrintStream stream, boolean verbose) {
204203
public Log(PrintStream stream, ArgumentParser argsParser) {
205204
this(stream, argsParser.verbose());
206205
traceLevel = argsParser.getTraceLevel();
207-
timestamp = argsParser.isTimestamp();
208206
}
209207

210208
/////////////////////////////////////////////////////////////////
@@ -220,10 +218,9 @@ public boolean verbose() {
220218
* Enable or disable verbose mode for printing messages.
221219
*/
222220
public void enableVerbose(boolean enable) {
223-
if (!verbose) {
224-
flushLogBuffer();
221+
if (!enable) {
222+
throw new RuntimeException("The non-verbose logging is not supported.");
225223
}
226-
verbose = enable;
227224
}
228225

229226
public int getTraceLevel() {
@@ -422,7 +419,6 @@ protected synchronized void logTo(PrintStream stream) {
422419
out.flush();
423420
}
424421
out = stream;
425-
verbose = true;
426422
}
427423

428424
/////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)