Is there way to direct console-output to log file using scala logging. In below code println writes to console is there way to direct that to log-file as defined logback.xml.
import com.typesafe.scalalogging.LazyLogging
object FileProcessing extends LazyLogging {
def main(args: Array[String]): Unit = {
val fp = new FileProcessing
logger.info(fp.fileMoves.toString())
println("My desired directory is - "+fp.dir)
}
}
Using below scala logging my build.gradle
compile "ch.qos.logback:logback-classic:1.1.7"
compile "com.typesafe.scala-logging:scala-logging_2.12:3.5.0"