Record the response status code and log it.

The log record is now written after execution of the user code.
introduce the notion of response_log_record ...

... and get the logging more organized.