[英]How to set SBT default log level to “warn”?
default SBT log level is info (see http://code.google.com/p/simple-build-tool/wiki/RunningSbt ).默认 SBT 日志级别为 info(请参阅http://code.google.com/p/simple-build-tool/wiki/RunningSbt )。
How do I set it to warn as the default?如何将其设置为默认警告?
@Christian: Thanks? @Christian:谢谢? Did you get that to work.
你有没有让它发挥作用。 I modified the sbt.boot:properties accordingly and passed it via:
我相应地修改了 sbt.boot:properties 并通过:
(1) -Dsbt.boot.properties=mysbt.boot.properties (1)-Dsbt.boot.properties=mysbt.boot.properties
(2) -jar /usr/local/Cellar/sbt/0.7.7/libexec/sbt-launch-0.7.7.jar "@/usr/local/Cellar/sbt/0.7.7/libexec/mysbt.boot.properties" (2) -jar /usr/local/Cellar/sbt/0.7.7/libexec/sbt-launch-0.7.7.jar "@/usr/local/Cellar/sbt/0.7.7/libexec/mysbt.boot.特性”
Both ways process my sbt.boot.properties but I still see [info] log messages.两种方式都处理我的 sbt.boot.properties 但我仍然看到 [info] 日志消息。 Overriding project settings does not work either.
覆盖项目设置也不起作用。
I wonder if this works at all.我想知道这是否有效。 I even found a bug .
我什至发现了一个错误。
Thanks, Lars谢谢,拉斯
You can set it temporarily by prefixing your action with warn
, eg您可以通过在您的操作前加上
warn
来临时设置它,例如
~> sbt warn compile
or from the sbt console:或从 sbt 控制台:
~> sbt
[info] Building project test 1.0 against Scala 2.8.1
[info] using TestProject with sbt 0.7.7 and Scala 2.7.7
> warn
Set log level to warn
> compile
>
In XSBT this seems to be the way to do it from the console在 XSBT 中,这似乎是从控制台执行此操作的方式
set logLevel in run := Level.Debug
https://github.com/harrah/xsbt/wiki/Quick-Configuration-Examples https://github.com/harrah/xsbt/wiki/Quick-Configuration-Examples
Note that these are SBT levels, so for example they don't work directly with Play 2.0!请注意,这些是 SBT 级别,因此例如它们不能直接与 Play 2.0 一起使用!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.