簡體   English   中英

如何將 SBT 默認日志級別設置為“警告”?

[英]How to set SBT default log level to “warn”?

默認 SBT 日志級別為 info(請參閱http://code.google.com/p/simple-build-tool/wiki/RunningSbt )。

如何將其設置為默認警告?


@Christian:謝謝? 你有沒有讓它發揮作用。 我相應地修改了 sbt.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.特性”

兩種方式都處理我的 sbt.boot.properties 但我仍然看到 [info] 日志消息。 覆蓋項目設置也不起作用。

我想知道這是否有效。 我什至發現了一個錯誤

謝謝,拉斯

您可以通過在您的操作前加上warn來臨時設置它,例如

~> sbt warn compile

或從 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
> 

在 XSBT 中,這似乎是從控制台執行此操作的方式

set logLevel in run := Level.Debug 

https://github.com/harrah/xsbt/wiki/Quick-Configuration-Examples

請注意,這些是 SBT 級別,因此例如它們不能直接與 Play 2.0 一起使用!

您可以在 sbt.boot.properties 中定義它,如下所述: sbt wiki

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM