Kaynağa Gözat

Client: Improve logging of the received message type

Julius Pfrommer 6 yıl önce
ebeveyn
işleme
815ad5eb97
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5 0
      src/client/ua_client.c

+ 5 - 0
src/client/ua_client.c

@@ -405,8 +405,13 @@ processServiceResponse(void *application, UA_SecureChannel *channel,
         goto finish;
     }
 
+#ifdef UA_ENABLE_TYPENAMES
+    UA_LOG_DEBUG(rd->client->config.logger, UA_LOGCATEGORY_CLIENT,
+                 "Decode a message of type %s", rd->responseType->typeName);
+#else
     UA_LOG_DEBUG(rd->client->config.logger, UA_LOGCATEGORY_CLIENT,
                  "Decode a message of type %u", responseId.identifier.numeric);
+#endif
 
     /* Decode the response */
     retval = UA_decodeBinary(message, &offset, rd->response, rd->responseType,