为什么Windows控制台中的“>”命令不能将所有消息重定向到文件?
我正在尝试使用sbt构建一个Scala项目,所以我运行了一个命令: sbt clean test > log.log 这意味着sbt工具写入Windows控制台的所有消息均应写入“ log.log”文件。但是有时我将stacktrace写入控制台而不是写入文件: 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 为什么“>”命令不能将所有消息重定向到文件?