Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.

Commit bb3aeee

Browse files
committed
Log debug and verbose messages to the un-captured System.err
Fixes the regression when running under `--verbose` ``` % scalac innerClassEnclMethodJavaReflection.scala % <in process execution of jvm/innerClassEnclMethodJavaReflection.scala> > innerClassEnclMethodJavaReflection-jvm.log % diff /Users/jz/code/scala/test/files/jvm/innerClassEnclMethodJavaReflection-jvm.log /Users/jz/code/scala/test/files/jvm/innerClassEnclMethodJavaReflection.check--- innerClassEnclMethodJavaReflection-jvm.log +++ empty @@ -1,3 +1,0 @@ -% scalac unreachable/Foo_1.scala -% scalac t2470/Test_1.scala -% scalac t2470/Read_Classfile_2.scala ```
1 parent 607df99 commit bb3aeee

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/scala/scala/tools/partest/nest/NestUI.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class NestUI(val verbose: Boolean = false, val debug: Boolean = false, val terse
3636
}
3737

3838
val color = new Colors(colorEnabled)
39+
private val realSysErr = System.err
3940
import color._
4041

4142
private[this] val (_outline, _success, _failure, _warning, _default) =
@@ -137,15 +138,15 @@ class NestUI(val verbose: Boolean = false, val debug: Boolean = false, val terse
137138
}
138139

139140
def verbose(msg: String): Unit =
140-
if (verbose) System.err.println(msg)
141+
if (verbose) realSysErr.println(msg)
141142

142143
def debug(msg: String): Unit =
143-
if (debug) System.err.println(msg)
144+
if (debug) realSysErr.println(msg)
144145

145146
def showAllJVMInfo(): Unit = {
146147
vlog(vmArgString)
147148
vlog(allPropertiesString)
148149
}
149150

150-
def vlog(msg: => String) = if (verbose) System.err.println(msg)
151+
def vlog(msg: => String) = if (verbose) realSysErr.println(msg)
151152
}

0 commit comments

Comments
 (0)