Browse Source

Fix log level in MonitoredItem_delete

StalderT 6 years ago
parent
commit
2ca787bbc8
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/server/ua_subscription_monitoreditem.c

+ 6 - 1
src/server/ua_subscription_monitoreditem.c

@@ -23,6 +23,12 @@ UA_MonitoredItem_init(UA_MonitoredItem *mon, UA_Subscription *sub) {
 
 void
 UA_MonitoredItem_delete(UA_Server *server, UA_MonitoredItem *monitoredItem) {
+    UA_Subscription *sub = monitoredItem->subscription;
+    UA_LOG_INFO_SESSION(server->config.logger, sub->session,
+                        "Subscription %u | MonitoredItem %i | "
+                        "Delete the MonitoredItem", sub->subscriptionId,
+                        monitoredItem->monitoredItemId);
+
     if(monitoredItem->monitoredItemType == UA_MONITOREDITEMTYPE_CHANGENOTIFY) {
         /* Remove the sampling callback */
         UA_MonitoredItem_unregisterSampleCallback(server, monitoredItem);
@@ -35,7 +41,6 @@ UA_MonitoredItem_delete(UA_Server *server, UA_MonitoredItem *monitoredItem) {
 
     /* Remove the queued notifications if attached to a subscription */
     if(monitoredItem->subscription) {
-        UA_Subscription *sub = monitoredItem->subscription;
         UA_Notification *notification, *notification_tmp;
         TAILQ_FOREACH_SAFE(notification, &monitoredItem->queue,
                            listEntry, notification_tmp) {