Convert existing code to use the new logging infrastructure