On Mon, May 3, 2010 at 2:46 PM, Carsten Ziegeler <[email protected]> wrote:
> What about a servlet filter?
Yes, that would work of course - I was wondering how that could be
done within Sling.
In the meantime Felix mentioned that additional RequestLoggerService
instances can be created via factory configurations, so if you're
using jcrinstall for example adding a configuration node like
"org.apache.sling.engine.impl.log.RequestLoggerService-combined": {
"request.log.service.output": "../logs/combinedrequest.log",
"request.log.service.outputtype": 1,
"request.log.service.onentry": false,
"request.log.service.format": "%t [%R] %m %U%q %H %s
%{Content-Type}o %D %b",
"jcr:createdBy": "admin",
"jcr:created": "Tue Apr 27 2010 13:51:37 GMT+0200",
"jcr:primaryType": "sling:OsgiConfig"
}
will create an additional request exit logger.
The log format string is based on the httpd mod_log_config,
http://httpd.apache.org/docs/2.1/mod/mod_log_config.html, though not
all flags are supported.
Logging of parameter values is not currently supported, but logging of
the complete query string is.
-Bertrand