Implementing logging response code and content length