I am unable to determine how to get a logfile. Other changes to logging - including setting DEBUG level on console - are working.
Here is the update to the resources/application.conf:
akka {
loglevel = DEBUG
event-handlers = ["akka.event.slf4j.Slf4jEventHandler"]
}
Here is the resources/logback.xml:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<target>System.out</target>
<encoder>
<pattern>%date{MM/dd HH:mm:ss.SSS} %-5level[%.15thread] %logger{1} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>akka.log</file>
<append>true</append>
<encoder>
<pattern>%date{MM/dd HH:mm:ss} %-5level[%thread] %logger{1} - %msg%n</pattern>
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
</root>
</configuration>
The logger is being accessed via
class MyWebsocketServer extends Actor with ActorLogging {
..
log.info("I see this on the Console but no files to be found..")
UPDATE
Following is the output at beginning of the process. Notice that only "default" loggers are mentioned.
[info] Running com.huawei.swlab.sparkpoc.spray.SimpleServer
[DEBUG] [05/21/2014 11:46:23.039] [run-main] [EventStream(akka://default)] logger log1-Logging$DefaultLogger started
[DEBUG] [05/21/2014 11:46:23.041] [run-main] [EventStream(akka://default)] Default Loggers started
It is becoming clear that the logback.xml is not being picked up. I ran the following from the git clone'd root dir:
sbt run
This is apparently not working in terms of the akka system is not looking for the src/main/resources. I will instead make an explicit addition to the classpath to see if that resolves it. Should not be necessary, but i'm fishing at this point.
Another update The sbt classpath was modified to include the src/main/resources - just in case. This did not have any effect.