2 * Copyright © 2017 Orange, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.transportpce.servicehandler;
11 import com.google.common.util.concurrent.FutureCallback;
12 import org.slf4j.Logger;
15 * Class to log future logging from datastore actions (write,modify and delete..).
17 * @author <a href="mailto:martial.coulibaly@gfi.com">Martial Coulibaly</a> on behalf of Orange
20 public class LoggingFuturesCallBack<V> implements FutureCallback<V> {
23 private String message;
25 public LoggingFuturesCallBack(String message, Logger log) {
26 this.message = message;
31 public void onFailure(Throwable ex) {
32 log.warn(message, ex);
37 public void onSuccess(V arg0) {
38 log.info("Success! {} ", arg0);