I am trying to build a Scala project with sbt, so I run a command:
sbt clean test > log.log
Which means that any messages that the sbt tool writes to the Windows console should be written to the "log.log" file. But sometimes I get stacktrace written to the console and not into the file:
C:\path>sbt clean test > log.log
java.lang.ExceptionInInitializerError
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.ClassCastException: Class org.infinispan.configuration.parsing.Parser60 does not implement org.infinispan.configuration.parsing.ConfigurationParser
Why does ">" command not redirect all messages to a file?