Add a hook around LiftServlet#doService() to enable custom service time measurement
Discussion thread including ticket request: https://groups.google.com/d/topic/liftweb/zw2SJv7Ms2s/discussion
It would be nice if user code could hook in at the same place that "logTime" does in the code below (from LiftServlet#doService()):
Thanks!
It would be nice if user code could hook in at the same place that "logTime" does in the code below (from LiftServlet#doService()):
def service(req: Req, resp: HTTPResponse): Boolean = {
try {
def doIt: Boolean = {
if (LiftRules.logServiceRequestTiming) {
logTime {
val ret = doService(req, resp)
val msg = "Service request (" + req.request.method + ") " + req.request.uri + " returned " + resp.getStatus + ","
(msg, ret)
}
} else {
doService(req, resp)
}
}
...
Thanks!
Leave a comment
on 2011-11-02 22:06 *
By mark.feeney
Description changed from Discussion thread including... to Discussion thread including...