简体   繁体   中英

How override loglevel from application.conf in sbt tests?

I have sbt project with test here application.conf which is used in tests :

akka {
    loglevel=DEBUG
    #other settings
}

When I try to run sbt clean test -Dakka.loglevel=INFO I see debug statements in log. For example:

[DEBUG] [11/26/2014 11:47:44.328] [unit-test-akka.actor.default-dispatcher-3] [akka://unit-test/system/cluster/heartbeatReceiver] started  (akka.cluster.ClusterHeartbeatReceiver@11ee5ffb)

Is it possible to pass java options from command line to override settings in application.conf ?

UPDATED

java version

java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

scala version

Welcome to Scala version 2.11.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_71).

sbt version

0.13.5

您需要更改传递给sbt的命令的顺序

sbt -Dakka.loglevel=INFO clean test

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM