Fixed compile errors when logging is disabled