I am trying to set up some basic logging for my akka actor system, but so far am only getting the standard logs and none of my added logs or an output file. I have followed along with the akka docs for logging and have set up the following:
I added these dependencies to the build.sbt file
"com.typesafe.akka" %% "akka-slf4j" % "2.3.14" "ch.qos.logback" % "logback-classic" % "1.0.9"
I added this to the application.conf file
akka { loggers = ["akka.event.slf4j.Slf4jLogger"] loglevel = "DEBUG" }
logback.xml is in src/main/resources
<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>
This is what I'm hopping is supposed to do the logging
import akka.event.Logging val log = Logging(context.system, classOf[TickActor]) log.info("Good Luck!")
I do not receive and messages of the failure from the standard logging, and I haven't been able to find additional solutions much different from what I already have. I have tried the suggestions in this question. It seemed to be the same issue I'm having, but the suggestions did not work. Have I missed a step or configured something wrong?