I would like to do some logging in SBT. I tried to get streams when initializing settingKey. However the compiler complains that A setting cannot depend on a task.
The config snippet is here.
val appConfig = settingKey[Config]("The parsed application.conf in SBT")
appConfig := {
// ...
streams.value.log.error("Cannot find application.conf. Please check if -Dconfig.file/resource is setting correctly.")
// ...
}
Is there any method to do logging in settingKey? Thanks.