Trying to use logRequestResponse but nothing being logged

86 views
Skip to first unread message

Kevin Esler

unread,
Mar 15, 2013, 12:44:18 PM3/15/13
to spray...@googlegroups.com
I'm trying to use logRequestResponse in the routing for a REST service I've built but nothing is being logged. Any clues as to what pieces need to be in place to enable it?

Here is what I have:

My routing source file has this:

trait MyService extends HttpService  {

  ....

  val route: Route = logRequestResponse("3") {

    pathPrefix("api" / PathElement) { licensee =>

....

My application.conf has this:

akka {

  event-handlers = ["akka.event.slf4j.Slf4jEventHandler"]

  loglevel = "DEBUG"

  actor {

    debug {

      fsm = true

    }

  }

}

My logback.xml file, which is being read at startup has this:

 <logger name="spray" level="DEBUG" /> 

I am getting logging output from logging calls in my own code via Akka's logging adapter.

But I am not getting any spray-routing related logging.

What could be missing?
 

Mathias

unread,
Mar 18, 2013, 4:01:35 AM3/18/13
to spray...@googlegroups.com
Kevin,

maybe you logback.xml still filters out the spray related messages because they are logged with the actor name as logging source rather than the class name.
Just temporarily allow log messages from all sources and see what you get.

Also see this section of the docs:
http://spray.io/documentation/spray-util/#LoggingContext

HTH and cheers,
Mathias

---
mat...@spray.io
http://spray.io
> --
> You received this message because you are subscribed to the Google Groups "spray-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to spray-user+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Reply all
Reply to author
Forward
0 new messages