log request and response