Use logger instead of directly printing to System.err

This commit is contained in:
Ethan Atkins 2019-06-02 11:22:04 -07:00
parent 67cbd6c50e
commit 2905373ff7
1 changed files with 2 additions and 2 deletions

View File

@ -365,8 +365,8 @@ private[sbt] object Continuous extends DeprecatedContinuous {
val terminationAction = Watch(task, callbacks.onStart, callbacks.nextEvent)
terminationAction match {
case e: Watch.HandleUnexpectedError =>
System.err.println("Caught unexpected error running continuous build:")
e.throwable.printStackTrace(System.err)
logger.error("Caught unexpected error running continuous build:")
e.throwable.getStackTrace.foreach(e => logger.error(e.toString))
case _ =>
}
callbacks.onTermination(terminationAction, command, currentCount.get(), state)