Cherry
Cherry

Reputation: 33544

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

Upvotes: 2

Views: 1079

Answers (1)

hicolour
hicolour

Reputation: 784

You need to change the order of the commands passed to the sbt

sbt -Dakka.loglevel=INFO clean test

Upvotes: 3

Related Questions