add a logging function for http status