Fix logging issues in bgpmanager 52/69152/2
authorStephen Kitt <skitt@redhat.com>
Tue, 6 Mar 2018 18:10:32 +0000 (19:10 +0100)
committerSam Hague <shague@redhat.com>
Fri, 9 Mar 2018 01:29:48 +0000 (01:29 +0000)
Change-Id: I54f233c1912c422190defd21b961581a71c457d6
Signed-off-by: Stephen Kitt <skitt@redhat.com>
bgpmanager/impl/src/main/java/org/opendaylight/netvirt/bgpmanager/BgpConfigurationManager.java
bgpmanager/impl/src/main/java/org/opendaylight/netvirt/bgpmanager/BgpManager.java
bgpmanager/impl/src/main/java/org/opendaylight/netvirt/bgpmanager/FibDSWriter.java
bgpmanager/impl/src/main/java/org/opendaylight/netvirt/bgpmanager/RetryOnException.java
bgpmanager/impl/src/main/java/org/opendaylight/netvirt/bgpmanager/oam/BgpAlarmBroadcaster.java
bgpmanager/impl/src/main/java/org/opendaylight/netvirt/bgpmanager/oam/BgpCounters.java
bgpmanager/impl/src/main/java/org/opendaylight/netvirt/bgpmanager/oam/BgpJMXAlarmAgent.java
bgpmanager/impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/client/BgpRouter.java
bgpmanager/impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/server/BgpThriftService.java

index 92632f352536f288527259e14146918fd9b13dc9..16105dc3109e212b6ab46be414bfdf83d9a7084a 100755 (executable)
@@ -243,8 +243,7 @@ public class BgpConfigurationManager {
         String updatePort = getProperty(UPDATE_PORT, DEF_UPORT);
         hostStartup = getProperty(CONFIG_HOST, DEF_CHOST);
         portStartup = getProperty(CONFIG_PORT, DEF_CPORT);
-        LOG.info("UpdateServer at localhost:" + updatePort + " ConfigServer at "
-                + hostStartup + ":" + portStartup);
+        LOG.info("UpdateServer at localhost:{}, ConfigServer at {}:{}", updatePort, hostStartup, portStartup);
         VtyshCli.setHostAddr(hostStartup);
         ClearBgpCli.setHostAddr(hostStartup);
         bgpRouter = BgpRouter.newInstance(this::getConfig, this::isBGPEntityOwner);
@@ -498,7 +497,7 @@ public class BgpConfigurationManager {
             synchronized (BgpConfigurationManager.this) {
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process add for asNum {}; {}", YANG_OBJ, val.getLocalAs(),
+                    LOG.debug("{} Unable to process add for asNum {}; {} {}", YANG_OBJ, val.getLocalAs(),
                             BgpRouterException.BGP_ERR_NOT_INITED, ADD_WARN);
                     return;
                 }
@@ -529,7 +528,7 @@ public class BgpConfigurationManager {
                 long asNum = val.getLocalAs();
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process remove for asNum {}; {}", YANG_OBJ, asNum,
+                    LOG.debug("{} Unable to process remove for asNum {}; {} {}", YANG_OBJ, asNum,
                             BgpRouterException.BGP_ERR_NOT_INITED, DEL_WARN);
                     return;
                 }
@@ -589,7 +588,7 @@ public class BgpConfigurationManager {
                 int stalePathTime = val.getStalepathTime().intValue();
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.error("{} Unable to add stale-path time {}; {}", YANG_OBJ, stalePathTime,
+                    LOG.error("{} Unable to add stale-path time {}; {} {}", YANG_OBJ, stalePathTime,
                             BgpRouterException.BGP_ERR_NOT_INITED, ADD_WARN);
                     return;
                 }
@@ -620,7 +619,7 @@ public class BgpConfigurationManager {
             synchronized (BgpConfigurationManager.this) {
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.error("{} Unable to delete stale-path time; {}", YANG_OBJ,
+                    LOG.error("{} Unable to delete stale-path time; {} {}", YANG_OBJ,
                             BgpRouterException.BGP_ERR_NOT_INITED, DEL_WARN);
                     return;
                 }
@@ -643,7 +642,7 @@ public class BgpConfigurationManager {
                 int stalePathTime = newval.getStalepathTime().intValue();
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.error("{} Unable to update stale-path time to {}; {}", YANG_OBJ, stalePathTime,
+                    LOG.error("{} Unable to update stale-path time to {}; {} {}", YANG_OBJ, stalePathTime,
                             BgpRouterException.BGP_ERR_NOT_INITED, ADD_WARN);
                     return;
                 }
@@ -674,7 +673,7 @@ public class BgpConfigurationManager {
             synchronized (BgpConfigurationManager.this) {
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.error("{} Unable to add logging for qbgp; {}", YANG_OBJ,
+                    LOG.error("{} Unable to add logging for qbgp; {} {}", YANG_OBJ,
                             BgpRouterException.BGP_ERR_NOT_INITED, ADD_WARN);
                     return;
                 }
@@ -705,7 +704,7 @@ public class BgpConfigurationManager {
             synchronized (BgpConfigurationManager.this) {
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.error("{} Unable to remove logging for qbgp; {}", YANG_OBJ,
+                    LOG.error("{} Unable to remove logging for qbgp; {} {}", YANG_OBJ,
                             BgpRouterException.BGP_ERR_NOT_INITED, DEL_WARN);
                     return;
                 }
@@ -726,7 +725,7 @@ public class BgpConfigurationManager {
             synchronized (BgpConfigurationManager.this) {
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.error("{} Unable to update logging for qbgp; {}", YANG_OBJ,
+                    LOG.error("{} Unable to update logging for qbgp; {} {}", YANG_OBJ,
                             BgpRouterException.BGP_ERR_NOT_INITED, ADD_WARN);
                     return;
                 }
@@ -761,7 +760,7 @@ public class BgpConfigurationManager {
                 final String md5Secret = extractMd5Secret(val);
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process add for peer {} as {}; {}", YANG_OBJ, peerIp, as,
+                    LOG.debug("{} Unable to process add for peer {} as {}; {} {}", YANG_OBJ, peerIp, as,
                             BgpRouterException.BGP_ERR_NOT_INITED, ADD_WARN);
                     return;
                 }
@@ -795,7 +794,7 @@ public class BgpConfigurationManager {
                 String peerIp = val.getAddress().getValue();
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process remove for peer {}; {}", YANG_OBJ, peerIp,
+                    LOG.debug("{} Unable to process remove for peer {}; {} {}", YANG_OBJ, peerIp,
                             BgpRouterException.BGP_ERR_NOT_INITED, DEL_WARN);
                     return;
                 }
@@ -843,7 +842,7 @@ public class BgpConfigurationManager {
                 String peerIp = val.getPeerIp().getValue();
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process add for peer {}; {}", YANG_OBJ, peerIp,
+                    LOG.debug("{} Unable to process add for peer {}; {} {}", YANG_OBJ, peerIp,
                             BgpRouterException.BGP_ERR_NOT_INITED, ADD_WARN);
                     return;
                 }
@@ -875,7 +874,7 @@ public class BgpConfigurationManager {
                 String peerIp = val.getPeerIp().getValue();
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process remove for peer {}; {}", YANG_OBJ, peerIp,
+                    LOG.debug("{} Unable to process remove for peer {}; {} {}", YANG_OBJ, peerIp,
                             BgpRouterException.BGP_ERR_NOT_INITED, DEL_WARN);
                     return;
                 }
@@ -917,7 +916,7 @@ public class BgpConfigurationManager {
                 String peerIp = val.getPeerIp().getValue();
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process add for peer {}; {}", YANG_OBJ, peerIp,
+                    LOG.debug("{} Unable to process add for peer {}; {} {}", YANG_OBJ, peerIp,
                             BgpRouterException.BGP_ERR_NOT_INITED, ADD_WARN);
                     return;
                 }
@@ -949,7 +948,7 @@ public class BgpConfigurationManager {
                 String peerIp = val.getPeerIp().getValue();
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process remove for peer {}; {}", YANG_OBJ, peerIp,
+                    LOG.debug("{} Unable to process remove for peer {}; {} {}", YANG_OBJ, peerIp,
                             BgpRouterException.BGP_ERR_NOT_INITED, DEL_WARN);
                     return;
                 }
@@ -991,7 +990,7 @@ public class BgpConfigurationManager {
                 String peerIp = val.getPeerIp().getValue();
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process add for peer {}; {}", YANG_OBJ, peerIp,
+                    LOG.debug("{} Unable to process add for peer {}; {} {}", YANG_OBJ, peerIp,
                             BgpRouterException.BGP_ERR_NOT_INITED, ADD_WARN);
                     return;
                 }
@@ -1025,7 +1024,7 @@ public class BgpConfigurationManager {
                 String peerIp = val.getPeerIp().getValue();
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process remove for peer {}; {}", YANG_OBJ, peerIp,
+                    LOG.debug("{} Unable to process remove for peer {}; {} {}", YANG_OBJ, peerIp,
                             BgpRouterException.BGP_ERR_NOT_INITED, DEL_WARN);
                     return;
                 }
@@ -1076,8 +1075,8 @@ public class BgpConfigurationManager {
                 String nh = val.getNexthop().getValue();
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process add for rd {} prefix {} nexthop {}; {}", YANG_OBJ, rd, pfxlen, nh,
-                            BgpRouterException.BGP_ERR_NOT_INITED, ADD_WARN);
+                    LOG.debug("{} Unable to process add for rd {} prefix {} nexthop {}; {} {}", YANG_OBJ, rd, pfxlen,
+                            nh, BgpRouterException.BGP_ERR_NOT_INITED, ADD_WARN);
                     return;
                 }
                 Long label = val.getLabel();
@@ -1120,7 +1119,7 @@ public class BgpConfigurationManager {
                 String pfxlen = val.getPrefixLen();
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process remove for rd {} prefix {}; {}", YANG_OBJ, rd, pfxlen,
+                    LOG.debug("{} Unable to process remove for rd {} prefix {}; {} {}", YANG_OBJ, rd, pfxlen,
                             BgpRouterException.BGP_ERR_NOT_INITED, DEL_WARN);
                     return;
                 }
@@ -1199,7 +1198,7 @@ public class BgpConfigurationManager {
                 String rd = vrfs.getRd();
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process add for rd {}; {}", YANG_OBJ, rd,
+                    LOG.debug("{} Unable to process add for rd {}; {} {}", YANG_OBJ, rd,
                             BgpRouterException.BGP_ERR_NOT_INITED, ADD_WARN);
                     return;
                 }
@@ -1233,7 +1232,7 @@ public class BgpConfigurationManager {
                         }
                     }
                 } catch (TException | BgpRouterException e) {
-                    LOG.error("{} get {}, Add received exception; {}", YANG_OBJ, ADD_WARN, e);
+                    LOG.error("{} get {}, Add received exception", YANG_OBJ, ADD_WARN, e);
                 }
             }
         }
@@ -1258,7 +1257,7 @@ public class BgpConfigurationManager {
                 String rd = val.getRd();
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process remove for rd {}; {}", YANG_OBJ, rd,
+                    LOG.debug("{} Unable to process remove for rd {}; {} {}", YANG_OBJ, rd,
                             BgpRouterException.BGP_ERR_NOT_INITED, DEL_WARN);
                     return;
                 }
@@ -1320,7 +1319,7 @@ public class BgpConfigurationManager {
             if (rd != null) {
                 BgpRouter br = getClient(YANG_OBJ);
                 if (br == null) {
-                    LOG.debug("{} Unable to process add for rd {}; {}", YANG_OBJ, rd,
+                    LOG.debug("{} Unable to process add for rd {}; {} {}", YANG_OBJ, rd,
                             BgpRouterException.BGP_ERR_NOT_INITED, ADD_WARN);
                     return;
                 }
@@ -1482,7 +1481,7 @@ public class BgpConfigurationManager {
                                     br.disableMultipath(afi, safi);
                                 }
                             } catch (TException | BgpRouterException e) {
-                                LOG.error(YANG_OBJ + " received exception: \"" + e + "\"");
+                                LOG.error("{} received exception", YANG_OBJ, e);
                             }
                         }
                     }
@@ -1535,11 +1534,10 @@ public class BgpConfigurationManager {
                         if (br != null) {
                             try {
                                 br.multipaths(vrfMaxpathVal.getRd(), vrfMaxpathVal.getMaxpaths());
-                                LOG.debug("Maxpath for vrf: " + vrfMaxpathVal.getRd() + " : is "
-                                        vrfMaxpathVal.getMaxpaths());
+                                LOG.debug("Maxpath for vrf {} is {}", vrfMaxpathVal.getRd(),
+                                        vrfMaxpathVal.getMaxpaths());
                             } catch (TException | BgpRouterException e) {
-                                LOG.error(YANG_OBJ
-                                        + " received exception: \"" + e + "\"");
+                                LOG.error("{} received exception", YANG_OBJ, e);
                             }
                         }
                     }
@@ -1856,10 +1854,10 @@ public class BgpConfigurationManager {
             if (vpnInstanceOpDataEntry != null) {
                 vni = vpnInstanceOpDataEntry.getL3vni();
                 if (vpnInstanceOpDataEntry.getType() == VpnInstanceOpDataEntry.Type.L2) {
-                    LOG.debug("Got RT2 withdraw for RD %s from tep %s with mac %s remote RD %s",
+                    LOG.debug("Got RT2 withdraw for RD {} {} from tep {} with mac {} remote RD {}",
                             vpnInstanceOpDataEntry.getVpnInstanceName(), vni, nextHop, macaddress, rd);
                     deleteTepfromElanDS(rd, nextHop, macaddress);
-                    LOG.debug("For rd %s. skipping fib update", rd);
+                    LOG.debug("For rd {}. skipping fib update", rd);
                     macupdate = true;
                 }
             } else {
@@ -2064,11 +2062,8 @@ public class BgpConfigurationManager {
         LOG.error("connecting  to bgp host {} ", host);
         boolean res = bgpRouter.connect(host, port);
         if (!res) {
-            String msg = "Cannot connect to BGP config server at " + host + ":" + port;
-            if (config != null) {
-                msg += "; Configuration Replay aborted";
-            }
-            LOG.error(msg);
+            LOG.error("Cannot connect to BGP config server at {}:{}{}", host, port,
+                    config != null ? "; Configuration Replay aborted" : "");
             return replaySucceded;
         }
         config = getConfig();
@@ -2244,7 +2239,7 @@ public class BgpConfigurationManager {
                             br.disableMultipath(afi, safi);
                         }
                     } catch (TException | BgpRouterException e) {
-                        LOG.info("Replay:multipaths() received exception: \"" + e + "\"");
+                        LOG.info("Replay:multipaths() received exception", e);
                     }
                 }
             }
@@ -2255,7 +2250,7 @@ public class BgpConfigurationManager {
                 try {
                     br.multipaths(vrfMaxpath.getRd(), vrfMaxpath.getMaxpaths());
                 } catch (TException | BgpRouterException e) {
-                    LOG.info("Replay:vrfMaxPath() received exception: \"" + e + "\"");
+                    LOG.info("Replay:vrfMaxPath() received exception", e);
                 }
             }
         }
@@ -2751,7 +2746,7 @@ public class BgpConfigurationManager {
                 rt2TepMap.get(rd).get(tepIp).put(mac, l2vni);
             } else {
                 LOG.debug("RT2 with mac {} l2vni {} from existing rd {} and new tep-ip {}",
-                        mac, rd, tepIp);
+                        mac, l2vni, rd, tepIp);
                 isFirstMacUpdateFromTep = true;
                 Map<String, Long> macList = new HashMap<>();
                 macList.put(mac, l2vni);
index 929b2456ce5f9281e3f3a2970a45ffc3f32ae142..3d8463e352ff43768d8d67c3a56bd66ff1c9620e 100644 (file)
@@ -157,9 +157,9 @@ public class BgpManager implements AutoCloseable, IBgpManager {
 
     @Override
     public void withdrawPrefix(String rd, String prefix) {
-        LOG.info("WITHDRAW: Removing Prefix rd {} prefix {} afi {}", rd, prefix);
+        LOG.info("WITHDRAW: Removing Prefix rd {} prefix {}", rd, prefix);
         bcm.delPrefix(rd, prefix);
-        LOG.info("WITHDRAW: Removed Prefix rd {} prefix {} afi {}", rd, prefix);
+        LOG.info("WITHDRAW: Removed Prefix rd {} prefix {}", rd, prefix);
     }
 
     @Override
index f2eea91ef243ab997242018956bae0c26702c2f7..e5f1f7e7c7c7dedac3c6afa39b619092668d62b5 100644 (file)
@@ -220,8 +220,7 @@ public class FibDSWriter {
             if (vrfTable != null) {
                 List<VrfEntry> vrfEntries = vrfTable.getVrfEntry();
                 if (vrfEntries == null) {
-                    String errMsg = "removeVrfSubFamilyFromDS : VrfEntry not found for rd " + rd;
-                    LOG.error(errMsg);
+                    LOG.error("removeVrfSubFamilyFromDS : VrfEntry not found for rd {}", rd);
                     return;
                 }
                 for (VrfEntry vrfEntry : vrfEntries) {
@@ -247,8 +246,7 @@ public class FibDSWriter {
                 }
             }
         } catch (ReadFailedException rfe) {
-            String errMsg = "removeVrfSubFamilyFromDS : Internal Error rd " + rd;
-            LOG.error(errMsg, rfe);
+            LOG.error("removeVrfSubFamilyFromDS : Internal Error rd {}", rd, rfe);
         }
         return;
     }
index 6712e1254effb6e1afccc090e34519e4f7b41139..2e1f0a7d0418764296d3049d8f6767f01c618eae 100644 (file)
@@ -17,7 +17,7 @@ public class RetryOnException {
     public static final int DEFAULT_RETRIES = Integer.MAX_VALUE;
     public static final long TIME_IN_MILLI = 1000;
     public static final int MAX_DELAY_FACTOR = 15;
-    private static final Logger LOG = LoggerFactory.getLogger(BgpConfigurationManager.class);
+    private static final Logger LOG = LoggerFactory.getLogger(RetryOnException.class);
 
     private int numberOfTriesLeft;
     private int delayFactor;
index d87632a4c8703c02b52d685aaec7746f8d753d9e..3aef48627435ed0f8bc2ba872676bfa1b0c4ccf5 100644 (file)
@@ -67,6 +67,6 @@ public class BgpAlarmBroadcaster extends NotificationBroadcasterSupport
         arrayList.add("BGF");
         sendNotification(new AttributeChangeNotification(this, sequenceNumber.incrementAndGet(),
             System.currentTimeMillis(), "raise Alarm Object notified", "raiseAlarmObject", "ArrayList", "", arrayList));
-        LOG.info("BGP: Alarm :" + userAlarm.getAlarmType() + " has been posted.");
+        LOG.info("BGP: Alarm {} has been posted.", userAlarm.getAlarmType());
     }
 }
index 7a1669f69f1ddedec3072937731bfe080dbaa403..f4e7bb01b6b204c63ea67fa4352c9d4edde9cadc 100644 (file)
@@ -417,7 +417,7 @@ public class BgpCounters implements Runnable, AutoCloseable {
                     String[] result = str.split("\\s+");
                     if (result.length > 9) {
                         String strIp = result[0].trim();
-                        LOG.trace("strIp " + strIp);
+                        LOG.trace("strIp {}", strIp);
 
                         if (!validate(strIp, afi)) {
                             break;
index 6653f541e38270e746180b936bed7a2feea067c4..2e53a16d97638d2b728ea7d56dbd5645e69bb667 100644 (file)
@@ -36,7 +36,7 @@ public class BgpJMXAlarmAgent {
         try {
             alarmName = new ObjectName(BEANNAME);
         } catch (MalformedObjectNameException e) {
-            LOG.error("ObjectName instance creation failed for BEANAME {} : {}", BEANNAME, e);
+            LOG.error("ObjectName instance creation failed for BEANAME {}", BEANNAME, e);
         }
     }
 
@@ -49,7 +49,7 @@ public class BgpJMXAlarmAgent {
                 LOG.debug("Registered Mbean {} successfully", alarmName);
             }
         } catch (InstanceAlreadyExistsException | MBeanRegistrationException | NotCompliantMBeanException e) {
-            LOG.error("Registeration failed for Mbean {} :{}", alarmName, e);
+            LOG.error("Registeration failed for Mbean {}", alarmName, e);
         }
     }
 
@@ -60,7 +60,7 @@ public class BgpJMXAlarmAgent {
                 LOG.debug("Unregistered Mbean {} successfully", alarmName);
             }
         } catch (InstanceNotFoundException | MBeanRegistrationException e) {
-            LOG.error("UnRegisteration failed for Mbean {} :{}", alarmName, e);
+            LOG.error("UnRegisteration failed for Mbean {}", alarmName, e);
         }
     }
 
@@ -70,7 +70,7 @@ public class BgpJMXAlarmAgent {
                     new String[] {String.class.getName(), String.class.getName(), String.class.getName()});
             LOG.trace("Invoked raiseAlarm function for Mbean {} with source {}", BEANNAME, src);
         } catch (InstanceNotFoundException | MBeanException | ReflectionException e) {
-            LOG.error("Invoking raiseAlarm method failed for Mbean {} :{}", alarmName, e);
+            LOG.error("Invoking raiseAlarm method failed for Mbean {}", alarmName, e);
         }
     }
 
@@ -80,7 +80,7 @@ public class BgpJMXAlarmAgent {
                     new String[] {String.class.getName(), String.class.getName(), String.class.getName()});
             LOG.trace("Invoked clearAlarm function for Mbean {} with source {}", BEANNAME, src);
         } catch (InstanceNotFoundException | MBeanException | ReflectionException e) {
-            LOG.error("Invoking clearAlarm method failed for Mbean {} :{}", alarmName, e);
+            LOG.error("Invoking clearAlarm method failed for Mbean {}", alarmName, e);
         }
     }
 }
index b0a0f8b96815128aaaeb46c674f8989727df9907..3de29a1e7e6f78fd7e24f48f372de766fc583eab 100644 (file)
@@ -202,7 +202,7 @@ public final class BgpRouter {
         }
 
         bgpClient = new BgpConfigurator.Client(new TBinaryProtocol(transport));
-        LOG.info("Connected to " + msgPiece);
+        LOG.info("Connected to {}", msgPiece);
         return true;
     }
 
@@ -417,7 +417,7 @@ public final class BgpRouter {
         bop.strs[0] = rd;
         bop.afi = af_afi.findByValue((int)afi);
         bop.safi = af_safi.findByValue((int)safi);
-        LOG.debug("Deleting BGP VRF rd: {} " + rd);
+        LOG.debug("Deleting BGP VRF rd: {}", rd);
         dispatch(bop);
     }
 
@@ -528,7 +528,7 @@ public final class BgpRouter {
         bop.type = Optype.LOG;
         bop.strs[0] = fileName;
         bop.strs[1] = debugLevel;
-        LOG.debug("Setting Log file to BGP VRF rd: {} ", fileName, debugLevel);
+        LOG.debug("Setting Log file to BGP VRF rd: {}, {}", fileName, debugLevel);
         dispatch(bop);
     }
 
@@ -611,7 +611,7 @@ public final class BgpRouter {
     public synchronized void enableMultipath(af_afi afi, af_safi safi) throws TException, BgpRouterException {
         bop.type = Optype.MP;
         bop.add = true;
-        LOG.debug("Enabling multipath for afi: " + afi.getValue() + " safi: " + safi.getValue());
+        LOG.debug("Enabling multipath for afi {}, safi {}", afi.getValue(), safi.getValue());
         bop.ints[0] = afi.getValue();
         bop.ints[1] = safi.getValue();
         dispatch(bop);
@@ -620,7 +620,7 @@ public final class BgpRouter {
     public synchronized void disableMultipath(af_afi afi, af_safi safi) throws TException, BgpRouterException {
         bop.type = Optype.MP;
         bop.add = false;
-        LOG.debug("Disabling multipath for afi: " + afi.getValue() + " safi: " + safi.getValue());
+        LOG.debug("Disabling multipath for afi {}, safi {}", afi.getValue(), safi.getValue());
         bop.ints[0] = afi.getValue();
         bop.ints[1] = safi.getValue();
         dispatch(bop);
index 4f31e1c73ea3c0dbd4a9521d4c2b3d8462853a40..5b29df4d6add3590a768ade7c2b8b45f04b7df44 100644 (file)
@@ -122,7 +122,7 @@ public class BgpThriftService {
                 });
                 server.serve();
             } catch (TTransportException e) {
-                LOG.error("Exception in BGP Updater server" + e);
+                LOG.error("Exception in BGP Updater server", e);
             }
         }