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);
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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();
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;
}
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;
}
}
}
} 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);
}
}
}
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;
}
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;
}
br.disableMultipath(afi, safi);
}
} catch (TException | BgpRouterException e) {
- LOG.error(YANG_OBJ + " received exception: \"" + e + "\"");
+ LOG.error("{} received exception", YANG_OBJ, e);
}
}
}
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);
}
}
}
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 {
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();
br.disableMultipath(afi, safi);
}
} catch (TException | BgpRouterException e) {
- LOG.info("Replay:multipaths() received exception: \"" + e + "\"");
+ LOG.info("Replay:multipaths() received exception", e);
}
}
}
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);
}
}
}
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);