add logging of parameters if debug logging is enabled.