We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5617228 commit 57d1bf9Copy full SHA for 57d1bf9
akka-testkit/src/test/scala/akka/testkit/WithLogCapturing.scala
@@ -50,12 +50,10 @@ trait WithLogCapturing extends SuiteMixin { this: TestSuite =>
50
/** Adds a prefix to every line printed out during execution of the thunk. */
51
private def withPrefixedOut[T](prefix: String)(thunk: => T): T = {
52
val oldOut = Console.out
53
- // https://github.com/lampepfl/dotty/issues/8425
54
- val os = new OutputStream {
55
- override def write(b: Int): Unit = oldOut.write(b)
56
- }
57
val prefixingOut =
58
- new PrintStream(os) {
+ new PrintStream(new OutputStream {
+ override def write(b: Int): Unit = oldOut.write(b)
+ }) {
59
override def println(x: Any): Unit =
60
oldOut.println(prefix + String.valueOf(x).replaceAllLiterally("\n", s"\n$prefix"))
61
}
0 commit comments