Add a central logging function for consistency