diff --git a/Source/Adobe.Target.Client/Service/OnDeviceDecisioningService.cs b/Source/Adobe.Target.Client/Service/OnDeviceDecisioningService.cs index 86125e7..fe91243 100644 --- a/Source/Adobe.Target.Client/Service/OnDeviceDecisioningService.cs +++ b/Source/Adobe.Target.Client/Service/OnDeviceDecisioningService.cs @@ -87,6 +87,7 @@ public TargetDeliveryResponse ExecuteRequest(TargetDeliveryRequest deliveryReque var ruleSet = this.ruleLoader.GetLatestRules(); if (ruleSet == null) { + TargetClient.Logger?.LogWarning("Decisioning rules not loaded, returning empty response"); var deliveryResponse = new DeliveryResponse( (int)HttpStatusCode.ServiceUnavailable, deliveryRequest.DeliveryRequest.RequestId, @@ -203,11 +204,16 @@ private void HandleDetails( private void SendNotifications(TargetDeliveryRequest request, TargetDeliveryResponse targetResponse, List notifications, TelemetryEntry telemetryEntry) { + TargetClient.Logger?.LogDebug("Sending notifications for requestId: {requestId} sessionId: {sessionId}", request.DeliveryRequest.RequestId, request.SessionId); + if (notifications.Count == 0 && telemetryEntry == null) { + TargetClient.Logger?.LogDebug("No notifications to send"); return; } + TargetClient.Logger?.LogDebug("Notifications: {notifications}", string.Join(", ", notifications)); + var deliveryRequest = request.DeliveryRequest; var locationHint = request.LocationHint ?? this.clusterLocator.GetLocationHint(); var telemetry = telemetryEntry != null ? new Telemetry(new List { telemetryEntry }) : null; diff --git a/Source/Adobe.Target.Client/Service/TargetService.cs b/Source/Adobe.Target.Client/Service/TargetService.cs index bf95cb0..fbc578c 100644 --- a/Source/Adobe.Target.Client/Service/TargetService.cs +++ b/Source/Adobe.Target.Client/Service/TargetService.cs @@ -112,6 +112,7 @@ private TargetDeliveryResponse GetTargetDeliveryResponse(TargetDeliveryRequest r { if (response == null) { + this.logger?.LogWarning("Null response for requestId: {requestId}, sessionId: {sessionId}", request.DeliveryRequest.RequestId, request.SessionId); return new TargetDeliveryResponse(request, null, HttpStatusCode.ServiceUnavailable); }