final Long startTimeMillis) {
if (result.getWrappedResult() instanceof PlainResult) {
int status = ((PlainResult) result.getWrappedResult()).header().status();
log(request, UserApp.currentUser().loginId, status, startTimeMillis);
} else if (result.getWrappedResult() instanceof AsyncResult) {
AsyncResult asyncResult = (AsyncResult) result.getWrappedResult();
Promise<play.api.mvc.Result> promise = Akka.asPromise(asyncResult.result());
promise.onRedeem(new Callback<play.api.mvc.Result>() {
@Override
public void invoke(final play.api.mvc.Result result) throws Throwable {
log(request, wrapResult(result), startTimeMillis);
}