I tried to get the log message from message.properties and did string interpolation with that log message.In this time,The log message is not interpolated with original message.
I am not able to get string interpolated result and am getting the output as log message what i have specified in properties file
Here I dont want to hard code any log message in scala file,Instead of this,I want to get all message from properties file and redirected into application log after interpolating string value.
import com.typesafe.config.ConfigFactory
import grizzled.slf4j.Logging
object Test extends Logging {
def main(args: Array[String]){
val subjectArea="Member"
val messageProp = ConfigFactory.load("message.properties")
val log=messageProp.getString("log.subject.area")
debug(s"$log")
}
}
message.properties
log.subject.area=The Subject Area : $subjectArea
Console Output: The Subject Area : $subjectArea i want this output : The Subject Area : Member
Thanks in advance!!! Test.scala message.propeties