I have done the following steps to try and configure logging for my akka application:
created an application.conf file and placed it in src/main/resources. It looks like:
akka { event-handlers = ["akka.event.slf4j.Slf4jEventHandler"] loglevel = "INFO" }
created a logback.xml file and placed it in src/main/resources. It looks like:
<configuration> <appender name="FILE" class="ch.qos.logback.core.fileappender"> <File>./logs/akka.log</File> <encoder> <pattern>%d{HH:mm:ss.SSS} [%-5level] %msg%n</pattern> </encoder> </appender> <root level="info"> <appender-ref ref="FILE" /> </root> </configuration>
added the following to my .scala sbt build file:
libraryDependencies += "com.typesafe.akka" % "akka-slf4j" % "2.0.3", libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.0.9" lazy val logback = "ch.qos.logback" % "logback-classic" % "1.0.9"attempted this code to log:
import akka.event.Logging
val log = Logging(context.system, this) log.info("...")
All I am getting is standard output logging, no log file creation with the logs.
Have I missed a step ? Or misconfigured something?