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.stubpce;
11 import com.google.common.util.concurrent.FutureCallback;
12 import org.slf4j.Logger;
15 * Class to log future logging from datastore actions (write, modify, delete..).
16 * @author <a href="mailto:martial.coulibaly@gfi.com">Martial Coulibaly</a> on
19 public class LoggingFuturesCallBack<V> implements FutureCallback<V> {
22 private String message;
24 public LoggingFuturesCallBack(String message, Logger log) {
25 this.message = message;
30 public void onFailure(Throwable ex) {
31 log.warn(message, ex);
36 public void onSuccess(V arg0) {
37 log.info("Success! {} ", arg0);