Replace debug macros with LogC