Refactor to use new logging macros with formatting.