I use Logback + SLF4J for journaling for those actors with the akka.actor.ActorLogging . However, when I do the log.error("Error occur!", e) code, the trace of the exception stack e not logged, but only the line Error occur! WARNING arguments left: 1 Error occur! WARNING arguments left: 1 . I wonder why and how to print the stack trace in the log file. Thanks. The following is the configuration of the logback.groovy file.
appender("FILE", RollingFileAppender) { file = "./logs/logd.txt" append = true rollingPolicy(TimeBasedRollingPolicy) { fileNamePattern = "./logs/logd.%d{yyyy-MM-dd}.log" maxHistory = 30 } encoder(PatternLayoutEncoder) { pattern = "%date{ISO8601} [%thread] %-5level %logger{36} %X{sourceThread} - %msg%n" } } root(DEBUG, ["FILE"])
source share