Make loggers synchronized

This is to workaround for "[success]" logs displaying after the prompt is displayed.
This commit is contained in:
Eugene Yokota 2019-04-21 03:11:11 -04:00
parent 95761b2ea1
commit 465ff8e10a
2 changed files with 1 additions and 4 deletions

View File

@ -10,7 +10,6 @@ package internal
import sbt.internal.util.{
RMap,
ConsoleOut,
ConsoleAppender,
LogOption,
JLine,
@ -62,7 +61,6 @@ private[sbt] final class TaskProgress(log: ManagedLogger)
}
}
private[this] val console = ConsoleOut.systemOut
override def afterAllCompleted(results: RMap[Task, Result]): Unit = {
// send an empty progress report to clear out the previous report
val event = ProgressEvent("Info", Vector(), Some(lastTaskCount.get), None, None)
@ -72,7 +70,7 @@ private[sbt] final class TaskProgress(log: ManagedLogger)
}
private[this] val skipReportTasks =
Set("run", "bgRun", "fgRun", "scala", "console", "consoleProject")
private[this] def report(): Unit = console.lockObject.synchronized {
private[this] def report(): Unit = {
val currentTasks = activeTasks.toVector
val ltc = lastTaskCount.get
val currentTasksCount = currentTasks.size

View File

@ -1 +0,0 @@
Log4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector