Clean up logging code, make it easier to parse for Splunk.