Zlog puts its own newlines on, and doing this makes logs look nasty.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
}
}
- zlog_info("Resetting peer %s%s due to change in addpath config\n",
+ zlog_info("Resetting peer %s%s due to change in addpath config",
CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP) ? "group " : "",
peer->host);
== bgp_vrf) {
/* delete route */
if (debug)
- zlog_debug("%s: deleting it\n",
+ zlog_debug("%s: deleting it",
__func__);
bgp_aggregate_decrement(bgp_vpn, &bn->p,
bpi, afi, safi);
if (prefix->rij->count)
return EIGRP_FSM_KEEP_STATE;
- zlog_info("All reply received\n");
+ zlog_info("All reply received");
if (head->reported_distance < prefix->fdistance) {
return EIGRP_FSM_EVENT_LR_FCS;
}
} else if (prefix->rij->count) {
return EIGRP_FSM_KEEP_STATE;
} else {
- zlog_info("All reply received\n");
+ zlog_info("All reply received");
return EIGRP_FSM_EVENT_LR;
}
} else if (msg->packet_type == EIGRP_OPC_UPDATE
if (prefix->rij->count) {
return EIGRP_FSM_KEEP_STATE;
} else {
- zlog_info("All reply received\n");
+ zlog_info("All reply received");
if (head->reported_distance
< prefix->fdistance) {
return EIGRP_FSM_EVENT_LR_FCS;
} else if (prefix->rij->count) {
return EIGRP_FSM_KEEP_STATE;
} else {
- zlog_info("All reply received\n");
+ zlog_info("All reply received");
return EIGRP_FSM_EVENT_LR;
}
} else if (msg->packet_type == EIGRP_OPC_UPDATE
if (tw_adj) {
if (tw_adj->state > ISIS_THREEWAY_DOWN) {
if (isis->debugs & DEBUG_ADJ_PACKETS) {
- zlog_debug("ISIS-Adj (%s): Rcvd P2P IIH from (%s) with invalid three-way state: %d\n",
+ zlog_debug("ISIS-Adj (%s): Rcvd P2P IIH from (%s) with invalid three-way state: %d",
iih->circuit->area->area_tag,
iih->circuit->interface->name,
tw_adj->state);
|| tw_adj->neighbor_circuit_id != (uint32_t) iih->circuit->idx)) {
if (isis->debugs & DEBUG_ADJ_PACKETS) {
- zlog_debug("ISIS-Adj (%s): Rcvd P2P IIH from (%s) which lists IS/Circuit different from us as neighbor.\n",
+ zlog_debug("ISIS-Adj (%s): Rcvd P2P IIH from (%s) which lists IS/Circuit different from us as neighbor.",
iih->circuit->area->area_tag,
iih->circuit->interface->name);
}
}
if (fabricd_initial_sync_is_complete(circuit->area) && resync_needed)
- zlog_warn("OpenFabric: Needed to resync LSPDB using CSNP!\n");
+ zlog_warn("OpenFabric: Needed to resync LSPDB using CSNP!");
retval = ISIS_OK;
out:
"VRF %u is already configured with VRF %s\n",
vrf->vrf_id, vrf->name);
else
- zlog_info("VRF %u is already configured with VRF %s\n",
+ zlog_info("VRF %u is already configured with VRF %s",
vrf->vrf_id, vrf->name);
return CMD_WARNING_CONFIG_FAILED;
}
length -= ZEBRA_HEADER_SIZE;
if (zclient_debug)
- zlog_debug("zclient 0x%p command 0x%x VRF %u\n",
+ zlog_debug("zclient 0x%p command 0x%x VRF %u",
(void *)zclient, command, vrf_id);
switch (command) {
break;
case ZEBRA_NEXTHOP_UPDATE:
if (zclient_debug)
- zlog_debug("zclient rcvd nexthop update\n");
+ zlog_debug("zclient rcvd nexthop update");
if (zclient->nexthop_update)
(*zclient->nexthop_update)(command, zclient, length,
vrf_id);
break;
case ZEBRA_IMPORT_CHECK_UPDATE:
if (zclient_debug)
- zlog_debug("zclient rcvd import check update\n");
+ zlog_debug("zclient rcvd import check update");
if (zclient->import_check_update)
(*zclient->import_check_update)(command, zclient,
length, vrf_id);
break;
case ZEBRA_FEC_UPDATE:
if (zclient_debug)
- zlog_debug("zclient rcvd fec update\n");
+ zlog_debug("zclient rcvd fec update");
if (zclient->fec_update)
(*zclient->fec_update)(command, zclient, length);
break;
if (IS_AREA_STUB(area)) {
if (IS_OSPF6_DEBUG_ORIGINATE(ROUTER))
- zlog_debug("Stubbing out area for if %s\n", area->name);
+ zlog_debug("Stubbing out area for if %s", area->name);
OSPF6_OPT_CLEAR(area->options, OSPF6_OPT_E);
} else if (IS_AREA_ENABLED(area)) {
if (IS_OSPF6_DEBUG_ORIGINATE(ROUTER))
- zlog_debug("Normal area for if %s\n", area->name);
+ zlog_debug("Normal area for if %s", area->name);
OSPF6_OPT_SET(area->options, OSPF6_OPT_E);
ospf6_asbr_send_externals_to_area(area);
}
range->path.u.cost_config = cost;
- zlog_debug("%s: for prefix %s, flag = %x\n", __func__,
+ zlog_debug("%s: for prefix %s, flag = %x", __func__,
argv[idx_ipv6_prefixlen]->arg, range->flag);
if (range->rnode == NULL) {
ospf6_route_add(range, oa->range_table);
for (ALL_LSDB(oa->ospf6->lsdb, lsa)) {
if (ntohs(lsa->header->type) == OSPF6_LSTYPE_AS_EXTERNAL) {
- zlog_debug("%s: Flooding AS-External LSA %s\n",
+ zlog_debug("%s: Flooding AS-External LSA %s",
__func__, lsa->name);
ospf6_flood_area(NULL, lsa, oa);
}
lsa = ospf6_create_single_router_lsa(oa, oa->lsdb_self, router_id);
if (lsa == NULL) {
if (IS_OSPF6_DEBUG_SPF(PROCESS))
- zlog_debug("%s: No router LSA for area %s\n", __func__,
+ zlog_debug("%s: No router LSA for area %s", __func__,
oa->name);
return;
}
olsa = (struct opaque_lsa *)data;
opaquelen = ntohs(data->length) - OSPF_LSA_HEADER_SIZE;
- zlog_debug("apiserver_lsa_print: opaquelen=%d\n", opaquelen);
+ zlog_debug("apiserver_lsa_print: opaquelen=%d", opaquelen);
for (i = 0; i < opaquelen; i++) {
zlog_debug("0x%x ", olsa->mydata[i]);
}
- zlog_debug("\n");
+ zlog_debug(" ");
}
/* -----------------------------------------------------------
void msg_print(struct msg *msg)
{
if (!msg) {
- zlog_debug("msg_print msg=NULL!\n");
+ zlog_debug("msg_print msg=NULL!");
return;
}
/* zlog_warn for debugging */
zlog_warn("ospf_apiserver_del_if");
- zlog_warn("ifp name=%s status=%d index=%d\n", ifp->name, ifp->status,
+ zlog_warn("ifp name=%s status=%d index=%d", ifp->name, ifp->status,
ifp->ifindex);
oi = ospf_apiserver_if_lookup_by_ifp(ifp);
for (i = 0; i < opaquelen; i++) {
zlog_debug("0x%x ", olsa->data[i]);
}
- zlog_debug("\n");
+ zlog_debug("");
}
return;
}
}
else {
- zlog_debug(" Segment Routing Algorithm TLV:\n");
+ zlog_debug(" Segment Routing Algorithm TLV:");
for (i = 0; i < ntohs(algo->header.length); i++)
switch (algo->value[i]) {
case 0:
- zlog_debug(" Algorithm %d: SPF\n", i);
+ zlog_debug(" Algorithm %d: SPF", i);
break;
case 1:
- zlog_debug(" Algorithm %d: Strict SPF\n", i);
+ zlog_debug(" Algorithm %d: Strict SPF", i);
break;
default:
zlog_debug(
/* Sanity check, if LSA type unknwon
merley skip any LSA */
if ((i < OSPF_MIN_LSA) || (i >= OSPF_MAX_LSA)) {
- zlog_debug("Strange request with LSA type %d\n", i);
+ zlog_debug("Strange request with LSA type %d", i);
return NULL;
}
if (path->nexthop.s_addr == 0)
{
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug (" directly attached to %s\r\n",
+ zlog_debug (" directly attached to %s\r",
ifindex2ifname (path->ifindex), VRF_DEFAULT);
}
else
{
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug (" via %s, %s\r\n",
+ zlog_debug (" via %s, %s\r",
inet_ntoa (path->nexthop),
ifindex2ifname (path->ifindex), VRF_DEFAULT);
}
monotime(&stop_time);
if (IS_DEBUG_OSPF_SR)
- zlog_debug("SR (%s): SPF Processing Time(usecs): %lld\n",
+ zlog_debug("SR (%s): SPF Processing Time(usecs): %lld",
__func__,
(stop_time.tv_sec - start_time.tv_sec) * 1000000LL
+ (stop_time.tv_usec - start_time.tv_usec));
pinfo = (struct pim_interface *)ifp->info;
if (!pinfo) {
if (PIM_DEBUG_PIM_TRACE)
- zlog_debug("%s: No pinfo!\n", __PRETTY_FUNCTION__);
+ zlog_debug("%s: No pinfo!", __PRETTY_FUNCTION__);
return;
}
if (pim_msg_send(pinfo->pim_sock_fd, src, originator, buffer,
* group on
* an interface that has just gone down.
*/
- zlog_warn("ripng join on %s EADDRINUSE (ignoring)\n",
+ zlog_warn("ripng join on %s EADDRINUSE (ignoring)",
ifp->name);
return 0; /* not an error */
}
ret = setsockopt(ripng->sock, IPPROTO_IPV6, IPV6_LEAVE_GROUP,
(char *)&mreq, sizeof(mreq));
if (ret < 0)
- zlog_warn("can't setsockopt IPV6_LEAVE_GROUP: %s\n",
+ zlog_warn("can't setsockopt IPV6_LEAVE_GROUP: %s",
safe_strerror(errno));
if (IS_RIPNG_DEBUG_EVENT)
timer = MAX_INITIAL_ADVERT_INTERVAL;
if (irdp->flags & IF_DEBUG_MISC)
- zlog_debug("IRDP: New timer for %s set to %u\n", ifp->name,
+ zlog_debug("IRDP: New timer for %s set to %u", ifp->name,
timer);
irdp->t_advertise = NULL;
case ICMP_ROUTERSOLICIT:
if (irdp->flags & IF_DEBUG_MESSAGES)
- zlog_debug("IRDP: RX Solicit on %s from %s\n",
+ zlog_debug("IRDP: RX Solicit on %s from %s",
ifp->name, inet_ntoa(src));
process_solicit(ifp);
if (!(irdp->flags & IF_ACTIVE)) {
if (irdp->flags & IF_DEBUG_MISC)
- zlog_debug("IRDP: RX ICMP for disabled interface %s\n",
+ zlog_debug("IRDP: RX ICMP for disabled interface %s",
ifp->name);
return 0;
}
off = *(uint32_t *)RTA_DATA(tb[NLMSGERR_ATTR_OFFS]);
if (off > h->nlmsg_len) {
- zlog_err("Invalid offset for NLMSGERR_ATTR_OFFS\n");
+ zlog_err("Invalid offset for NLMSGERR_ATTR_OFFS");
} else if (!(h->nlmsg_flags & NLM_F_CAPPED)) {
/*
* Header of failed message
* RTA_IFP) is required.
*/
if (!ifnlen) {
- zlog_debug("Interface index %d (new) missing ifname\n",
+ zlog_debug("Interface index %d (new) missing ifname",
ifm->ifm_index);
return -1;
}
if (!(h->nlmsg_type == RTM_NEWROUTE || h->nlmsg_type == RTM_DELROUTE)) {
/* If this is not route add/delete message print warning. */
- zlog_debug("Kernel message: %s NS %u\n",
+ zlog_debug("Kernel message: %s NS %u",
nl_msg_type_to_str(h->nlmsg_type), ns_id);
return 0;
}
if (!old_ptm_enable && ptm_cb.ptm_enable) {
if (!if_is_operative(ifp) && send_linkdown) {
if (IS_ZEBRA_DEBUG_EVENT)
- zlog_debug("%s: Bringing down interface %s\n",
+ zlog_debug("%s: Bringing down interface %s",
__func__, ifp->name);
if_down(ifp);
}
ifp->ptm_enable = ZEBRA_IF_PTM_ENABLE_OFF;
if (if_is_no_ptm_operative(ifp) && send_linkup) {
if (IS_ZEBRA_DEBUG_EVENT)
- zlog_debug("%s: Bringing up interface %s\n",
+ zlog_debug("%s: Bringing up interface %s",
__func__, ifp->name);
if_up(ifp);
}
if (state_changed || force) {
if (IS_ZEBRA_DEBUG_NHT) {
prefix2str(&nrn->p, bufn, INET6_ADDRSTRLEN);
- zlog_debug("%u:%s: Route import check %s %s\n", vrfid,
+ zlog_debug("%u:%s: Route import check %s %s", vrfid,
bufn, rnh->state ? "passed" : "failed",
state_changed ? "(state changed)" : "");
}
table = get_rnh_table(vrfid, afi, type);
if (!table) {
- zlog_debug("print_rnhs: rnh table not found\n");
+ zlog_debug("print_rnhs: rnh table not found");
return;
}
ntable = get_rnh_table(vrf_id, afi, type);
if (!ntable) {
- zlog_debug("cleanup_rnh_client: rnh table not found\n");
+ zlog_debug("cleanup_rnh_client: rnh table not found");
return -1;
}