Search code examples
loggingrestlet

How can I change the default log template in a restlet application?


The Restlet documentation is a bit vague on this. It describes the default template that's used (at: http://restlet.com/technical-resources/restlet-framework/guide/2.3/core/services/log), but provides little guidance on how to actually change it.

I'm not worried about the verbosity, classes, or integration with the JDK. That's all fine. The problem is simply that I'm using a reverse proxy and it's logging every single request as coming from 127.0.0.1, which is a bit unhelpful. I know an X-Real-IP header is being added, and want to get that being logged.

It's clear there's a LogService in there somewhere, I just don't know how to get hold of it to modify the template or fields that it's using for display.


Solution

  • We've updated the log service documentation:

    http://restlet.com/technical-resources/restlet-framework/guide/2.3/core/services/log

    Please tell us if it fits your needs.