Only debug/format the message if debug logging is on