Enhanced logging functions.