added function to log all requests and headers