Added request and response logging functionality