mirror of https://github.com/sbt/sbt.git
Don't use ProxyTerminal in background job
If we use the ProxyTerminal in the background jobs, the logs would be spread across different terminals, switching from active client to active client. We want the logs to stick to the client that started the job.
This commit is contained in:
parent
6bcda6684a
commit
592086b889
|
|
@ -438,6 +438,7 @@ object Terminal {
|
|||
override def toString: String = s"ProxyTerminal(current = $t)"
|
||||
}
|
||||
private[sbt] def get: Terminal = ProxyTerminal
|
||||
private[sbt] def current: Terminal = activeTerminal.get
|
||||
|
||||
private[sbt] def withIn[T](in: InputStream)(f: => T): T = {
|
||||
val original = inputStream.get
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ object LogManager {
|
|||
task: ScopedKey[_],
|
||||
context: LoggerContext
|
||||
): ManagedLogger = {
|
||||
val console = screen(task, state)
|
||||
val console = ConsoleAppender("bg-" + ConsoleAppender.generateName(), ITerminal.current)
|
||||
LogManager.backgroundLog(data, state, task, console, relay(()), context)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue