/**
* Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
- *
+ *
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
import org.slf4j.LoggerFactory;
/**
- * dummy implementation flushing events into log
+ * Dummy implementation flushing events into log.
*/
public class FlowEventListenerLoggingImpl implements SalFlowListener {
-
- private static Logger LOG = LoggerFactory
+
+ private static final Logger LOG = LoggerFactory
.getLogger(FlowEventListenerLoggingImpl.class);
@Override
public void onFlowAdded(FlowAdded notification) {
- LOG.info("flow to be added.........................." + notification.toString());
- LOG.info("added flow Xid........................." + notification.getTransactionId().getValue());
- LOG.info("-----------------------------------------------------------------------------------");
+ LOG.info("flow to be added {}", notification.toString());
+ LOG.info("added flow Xid {}", notification.getTransactionId().getValue());
}
@Override
public void onFlowRemoved(FlowRemoved notification) {
- LOG.debug("removed flow.........................." + notification.toString());
- LOG.debug("remove flow Xid........................." + notification.getTransactionId().getValue());
- LOG.debug("-----------------------------------------------------------------------------------");
+ LOG.debug("removed flow {}", notification.toString());
+ LOG.debug("remove flow Xid {}", notification.getTransactionId().getValue());
}
@Override
public void onFlowUpdated(FlowUpdated notification) {
- LOG.debug("updated flow.........................." + notification.toString());
- LOG.debug("updated flow Xid........................." + notification.getTransactionId().getValue());
- LOG.debug("-----------------------------------------------------------------------------------");
+ LOG.debug("updated flow {}", notification.toString());
+ LOG.debug("updated flow Xid {}", notification.getTransactionId().getValue());
}
@Override
public void onNodeErrorNotification(NodeErrorNotification notification) {
- LOG.error("Error notification flow Xid........................."
+ //commenting as we have a NodeErrorListener
+ /* LOG.error("Error notification flow Xid........................."
+ notification.getTransactionId().getValue());
LOG.debug("notification Begin-Transaction:"
+ notification.getTransactionUri()
+ "-----------------------------------------------------------------------------------");
+ */
}
@Override
@Override
public void onSwitchFlowRemoved(SwitchFlowRemoved notification) {
- LOG.debug("Switch flow removed : Cookies..................."
- + notification.getCookie().toString());
- LOG.debug("-----------------------------------------------------------------------------------");
+ LOG.debug("Switch flow removed : Cookies {}", notification.getCookie().toString());
}
}