typesafehub / sbt-conductr

Typesafe ConductR plugin for sbt
Other
29 stars 22 forks source link

Bundle project with sbt 0.13.7 produces logging error #76

Closed dsugden closed 9 years ago

dsugden commented 9 years ago

Steps to reproduce:

cd into sbt-conductr-tester sub project

changes build.properties to:

sbt.version = 0.13.7

try to load a bundle to a conductr server:

java.lang.RuntimeException: Settings logger used after project was loaded.
at scala.sys.package$.error(package.scala:27)
at sbt.LogManager$$anon$1$$anonfun$slog$1.apply(LogManager.scala:110)
at sbt.LogManager$$anon$1$$anonfun$slog$1.apply(LogManager.scala:110)
at scala.Option.getOrElse(Option.scala:120)
at sbt.LogManager$$anon$1.slog(LogManager.scala:110)
at sbt.LogManager$$anon$1.log(LogManager.scala:115)
at sbt.Logger$class.info(Logger.scala:117)
at sbt.LogManager$$anon$1.info(LogManager.scala:108)
at com.typesafe.conductr.sbt.ConductR$$anonfun$com$typesafe$conductr$sbt$ConductR$$doLoadBundle$1$1.apply(ConductR.scala:39)
at com.typesafe.conductr.sbt.ConductR$$anonfun$com$typesafe$conductr$sbt$ConductR$$doLoadBundle$1$1.apply(ConductR.scala:38)

This is due to using sLog as the logger. It looks like Josh fixed this in 0.13.8

However: wouldn't it be better to just use

state.log.info("yadda")

instead of passing this logger through?

I've tested this and it works. I can create a PR tomorrow 9AM (-4 UTC)

huntc commented 9 years ago

Yes, better to use state. PR appreciated. Thanks.

huntc commented 9 years ago

Fixed PR https://github.com/sbt/sbt-conductr/pull/78