mirror of https://github.com/sbt/sbt.git
Merge pull request #5836 from eatkins/relay-appender
Use null ConsoleOut for RelayAppender
This commit is contained in:
commit
f655d91d86
|
|
@ -21,6 +21,13 @@ sealed trait ConsoleOut {
|
|||
|
||||
object ConsoleOut {
|
||||
def systemOut: ConsoleOut = terminalOut
|
||||
private[sbt] object NullConsoleOut extends ConsoleOut {
|
||||
override val lockObject: AnyRef = this
|
||||
override def print(s: String): Unit = {}
|
||||
override def println(): Unit = {}
|
||||
override def println(s: String): Unit = {}
|
||||
override def flush(): Unit = {}
|
||||
}
|
||||
private[sbt] def globalProxy: ConsoleOut = Proxy
|
||||
private[sbt] def setGlobalProxy(out: ConsoleOut): Unit = Proxy.set(out)
|
||||
private[sbt] def getGlobalProxy: ConsoleOut = Proxy.proxy.get
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import sbt.util.Level
|
|||
class RelayAppender(override val name: String)
|
||||
extends ConsoleAppender(
|
||||
name,
|
||||
ConsoleAppender.Properties.from(ConsoleOut.globalProxy, true, true),
|
||||
ConsoleAppender.Properties.from(ConsoleOut.NullConsoleOut, true, true),
|
||||
_ => None
|
||||
) {
|
||||
lazy val exchange = StandardMain.exchange
|
||||
|
|
|
|||
Loading…
Reference in New Issue