Modify log macros and re-align with CM