diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/ISubscriberNotificationRequestLogger.java b/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/ISubscriberNotificationRequestLogger.java index 698e349cf226b5754b16f310800e38717146b6bd..15b03b7f164626acf7bb3ad2653c02d9ced7793c 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/ISubscriberNotificationRequestLogger.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/ISubscriberNotificationRequestLogger.java @@ -1,9 +1,24 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package org.opengroup.osdu.notification.provider.interfaces; import org.opengroup.osdu.core.common.http.HttpResponse; +import org.opengroup.osdu.core.common.model.notification.Subscription; public interface ISubscriberNotificationRequestLogger { - default void log(String notificationId, String endpoint, HttpResponse response) { + default void log(String notificationId, Subscription subscription, HttpResponse response) { } } diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/service/NotificationHandler.java b/notification-core/src/main/java/org/opengroup/osdu/notification/service/NotificationHandler.java index bbda79e41c00bac13df5f30c22c1150580e5a14e..ea3c86e78eaafd52ed161e200a131d6e13e46134 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/service/NotificationHandler.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/service/NotificationHandler.java @@ -79,7 +79,7 @@ public class NotificationHandler { HttpRequest request = HttpRequest.post().url(pushUrl).headers(requestHeader).body(pubsubMessage).connectionTimeout(WAITING_TIME).build(); this.LOGGER.debug("Sending out notification to endpoint: " + endpoint); HttpResponse response = httpClient.send(request); - subscriberNotificationRequestLogger.log(notificationId, endpoint, response); + subscriberNotificationRequestLogger.log(notificationId, subscription, response); return response; } } \ No newline at end of file diff --git a/provider/notification-azure/src/main/java/org/opengroup/osdu/notification/provider/azure/util/SubscriberNotificationRequestLogger.java b/provider/notification-azure/src/main/java/org/opengroup/osdu/notification/provider/azure/util/SubscriberNotificationRequestLogger.java index e05e8f4856326a2742b721b41db89dcc2ecab864..eb00756f77cfb2595e6bea7a2879857156fdfa38 100644 --- a/provider/notification-azure/src/main/java/org/opengroup/osdu/notification/provider/azure/util/SubscriberNotificationRequestLogger.java +++ b/provider/notification-azure/src/main/java/org/opengroup/osdu/notification/provider/azure/util/SubscriberNotificationRequestLogger.java @@ -1,3 +1,17 @@ +// Copyright © Schlumberger +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package org.opengroup.osdu.notification.provider.azure.util; import org.opengroup.osdu.azure.logging.DependencyLogger;