Move logging functions to helper to clean up Canto definition