Some logging systems are, er, "allergic" to tabs in log messages.
(RFC5424: "The syslog application SHOULD avoid octet values below 32")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
int family_type = (bpc->bpc_ipv4) ? AF_INET : AF_INET6;
int error = 0;
- log_debug("\tpeer: %s", bpc->bpc_ipv4 ? "ipv4" : "ipv6");
+ log_debug(" peer: %s", bpc->bpc_ipv4 ? "ipv4" : "ipv6");
JSON_FOREACH (jo, joi, join) {
key = json_object_iter_peek_name(&joi);
if (strcmp(key, "multihop") == 0) {
bpc->bpc_mhop = json_object_get_boolean(jo_val);
- log_debug("\tmultihop: %s",
+ log_debug(" multihop: %s",
bpc->bpc_mhop ? "true" : "false");
} else if (strcmp(key, "peer-address") == 0) {
sval = json_object_get_string(jo_val);
__func__, __LINE__, sval);
error++;
}
- log_debug("\tpeer-address: %s", sval);
+ log_debug(" peer-address: %s", sval);
} else if (strcmp(key, "local-address") == 0) {
sval = json_object_get_string(jo_val);
if (strtosa(sval, &bpc->bpc_local) != 0
__func__, __LINE__, sval);
error++;
}
- log_debug("\tlocal-address: %s", sval);
+ log_debug(" local-address: %s", sval);
} else if (strcmp(key, "local-interface") == 0) {
bpc->bpc_has_localif = true;
sval = json_object_get_string(jo_val);
if (strlcpy(bpc->bpc_localif, sval,
sizeof(bpc->bpc_localif))
> sizeof(bpc->bpc_localif)) {
- log_debug("\tlocal-interface: %s (truncated)",
- sval);
+ log_debug(
+ " local-interface: %s (truncated)",
+ sval);
error++;
} else {
- log_debug("\tlocal-interface: %s", sval);
+ log_debug(" local-interface: %s", sval);
}
} else if (strcmp(key, "vrf-name") == 0) {
bpc->bpc_has_vrfname = true;
if (strlcpy(bpc->bpc_vrfname, sval,
sizeof(bpc->bpc_vrfname))
> sizeof(bpc->bpc_vrfname)) {
- log_debug("\tvrf-name: %s (truncated)", sval);
+ log_debug(" vrf-name: %s (truncated)",
+ sval);
error++;
} else {
- log_debug("\tvrf-name: %s", sval);
+ log_debug(" vrf-name: %s", sval);
}
} else if (strcmp(key, "detect-multiplier") == 0) {
bpc->bpc_detectmultiplier =
json_object_get_int64(jo_val);
bpc->bpc_has_detectmultiplier = true;
- log_debug("\tdetect-multiplier: %u",
+ log_debug(" detect-multiplier: %u",
bpc->bpc_detectmultiplier);
} else if (strcmp(key, "receive-interval") == 0) {
bpc->bpc_recvinterval = json_object_get_int64(jo_val);
bpc->bpc_has_recvinterval = true;
- log_debug("\treceive-interval: %llu",
+ log_debug(" receive-interval: %llu",
bpc->bpc_recvinterval);
} else if (strcmp(key, "transmit-interval") == 0) {
bpc->bpc_txinterval = json_object_get_int64(jo_val);
bpc->bpc_has_txinterval = true;
- log_debug("\ttransmit-interval: %llu",
+ log_debug(" transmit-interval: %llu",
bpc->bpc_txinterval);
} else if (strcmp(key, "echo-interval") == 0) {
bpc->bpc_echointerval = json_object_get_int64(jo_val);
bpc->bpc_has_echointerval = true;
- log_debug("\techo-interval: %llu",
+ log_debug(" echo-interval: %llu",
bpc->bpc_echointerval);
} else if (strcmp(key, "create-only") == 0) {
bpc->bpc_createonly = json_object_get_boolean(jo_val);
- log_debug("\tcreate-only: %s",
+ log_debug(" create-only: %s",
bpc->bpc_createonly ? "true" : "false");
} else if (strcmp(key, "shutdown") == 0) {
bpc->bpc_shutdown = json_object_get_boolean(jo_val);
- log_debug("\tshutdown: %s",
+ log_debug(" shutdown: %s",
bpc->bpc_shutdown ? "true" : "false");
} else if (strcmp(key, "echo-mode") == 0) {
bpc->bpc_echo = json_object_get_boolean(jo_val);
- log_debug("\techo-mode: %s",
+ log_debug(" echo-mode: %s",
bpc->bpc_echo ? "true" : "false");
} else if (strcmp(key, "label") == 0) {
bpc->bpc_has_label = true;
if (strlcpy(bpc->bpc_label, sval,
sizeof(bpc->bpc_label))
> sizeof(bpc->bpc_label)) {
- log_debug("\tlabel: %s (truncated)", sval);
+ log_debug(" label: %s (truncated)",
+ sval);
error++;
} else {
- log_debug("\tlabel: %s", sval);
+ log_debug(" label: %s", sval);
}
} else {
sval = json_object_get_string(jo_val);
if (pl == NULL)
return 1;
- log_debug("\tpeer-label: %s", sval);
+ log_debug(" peer-label: %s", sval);
/* Translate the label into BFD address keys. */
bs_to_bpc(pl->pl_bs, bpc);
} else {
prefix2str(connected->address, buf, sizeof(buf));
zlog_warn(
- "Nonexistent ip address %s removal attempt from \
- circuit %s",
+ "Nonexistent ip address %s removal attempt from circuit %s",
buf, circuit->interface->name);
zlog_warn("Current ip addresses on %s:",
circuit->interface->name);
if (!found) {
prefix2str(connected->address, buf, sizeof(buf));
zlog_warn(
- "Nonexistent ip address %s removal attempt from \
- circuit %s",
+ "Nonexistent ip address %s removal attempt from circuit %s",
buf, circuit->interface->name);
zlog_warn("Current ip addresses on %s:",
circuit->interface->name);
{
struct route_node *rn;
struct ospf_route * or ;
- char buf1[BUFSIZ];
- char buf2[BUFSIZ];
struct listnode *pnode;
struct ospf_path *path;
-#if 0
- zlog_debug ("Type Dest Area Path Type Cost Next Adv.");
- zlog_debug (" Hop(s) Router(s)");
-#endif /* 0 */
-
zlog_debug("========== OSPF routing table ==========");
for (rn = route_top(rt); rn; rn = route_next(rn))
if ((or = rn->info) != NULL) {
if (or->type == OSPF_DESTINATION_NETWORK) {
- zlog_debug("N %s/%d\t%s\t%s\t%d",
- inet_ntop(AF_INET, &rn->p.u.prefix4,
- buf1, BUFSIZ),
- rn->p.prefixlen,
- inet_ntop(AF_INET,
- & or->u.std.area_id, buf2,
- BUFSIZ),
+ zlog_debug("N %-18pFX %-15pI4 %s %d", &rn->p,
+ &or->u.std.area_id,
ospf_path_type_str[or->path_type],
or->cost);
for (ALL_LIST_ELEMENTS_RO(or->paths, pnode,
zlog_debug(" -> %s",
inet_ntoa(path->nexthop));
} else
- zlog_debug("R %s\t%s\t%s\t%d",
- inet_ntop(AF_INET, &rn->p.u.prefix4,
- buf1, BUFSIZ),
- inet_ntop(AF_INET,
- & or->u.std.area_id, buf2,
- BUFSIZ),
+ zlog_debug("R %-18pI4 %-15pI4 %s %d",
+ &rn->p.u.prefix4,
+ &or->u.std.area_id,
ospf_path_type_str[or->path_type],
or->cost);
}
if (IS_DEBUG_OSPF_EVENT) {
zlog_info("SPF Processing Time(usecs): %ld", total_spf_time);
- zlog_info("\t SPF Time: %ld", spf_time);
- zlog_info("\t InterArea: %ld", ia_time);
- zlog_info("\t Prune: %ld", prune_time);
- zlog_info("\tRouteInstall: %ld", rt_time);
+ zlog_info(" SPF Time: %ld", spf_time);
+ zlog_info(" InterArea: %ld", ia_time);
+ zlog_info(" Prune: %ld", prune_time);
+ zlog_info(" RouteInstall: %ld", rt_time);
if (IS_OSPF_ABR(ospf))
- zlog_info("\t ABR: %ld (%d areas)", abr_time,
- areas_processed);
+ zlog_info(" ABR: %ld (%d areas)",
+ abr_time, areas_processed);
zlog_info("Reason(s) for SPF: %s", rbuf);
}
i, fval1, i + 1, fval2);
else
zlog_debug(
- " [%d]: %g (Bytes/sec),\t[%d]: %g (Bytes/sec)",
+ " [%d]: %g (Bytes/sec), [%d]: %g (Bytes/sec)",
i, fval1, i + 1, fval2);
}
case NEXTHOP_TYPE_IPV4_IFINDEX:
case NEXTHOP_TYPE_IPV4:
zlog_debug(
- "\tNexthop %s, type: %d, ifindex: %d, vrf: %d, label_num: %d",
+ " Nexthop %s, type: %d, ifindex: %d, vrf: %d, label_num: %d",
inet_ntop(AF_INET, &znh->gate.ipv4.s_addr, buf,
sizeof(buf)),
znh->type, znh->ifindex, znh->vrf_id,
case NEXTHOP_TYPE_IPV6_IFINDEX:
case NEXTHOP_TYPE_IPV6:
zlog_debug(
- "\tNexthop %s, type: %d, ifindex: %d, vrf: %d, label_num: %d",
+ " Nexthop %s, type: %d, ifindex: %d, vrf: %d, label_num: %d",
inet_ntop(AF_INET6, &znh->gate.ipv6, buf,
sizeof(buf)),
znh->type, znh->ifindex, znh->vrf_id,
znh->label_num);
break;
case NEXTHOP_TYPE_IFINDEX:
- zlog_debug("\tNexthop IFINDEX: %d, ifindex: %d",
+ zlog_debug(" Nexthop IFINDEX: %d, ifindex: %d",
znh->type, znh->ifindex);
break;
case NEXTHOP_TYPE_BLACKHOLE:
- zlog_debug("\tNexthop blackhole");
+ zlog_debug(" Nexthop blackhole");
break;
}
}
/* Add DISTANCE_INFINITY check. */
if (old_re && (old_re->distance == DISTANCE_INFINITY)) {
if (IS_ZEBRA_DEBUG_RIB)
- zlog_debug("\tSkipping due to Infinite Distance");
+ zlog_debug(" Skipping due to Infinite Distance");
return;
}
if (filter_vlan && vid != filter_vlan) {
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("\tFiltered due to filter vlan: %d",
+ zlog_debug(" Filtered due to filter vlan: %d",
filter_vlan);
return 0;
}
/* Drop "permanent" entries. */
if (ndm->ndm_state & NUD_PERMANENT) {
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("\tDropping entry because of NUD_PERMANENT");
- return 0;
+ zlog_debug(
+ " Dropping entry because of NUD_PERMANENT");
+ return 0;
}
if (IS_ZEBRA_IF_VXLAN(ifp))
if (!ifp) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
- "\t%s: Onlink and interface: %u[%u] does not exist",
+ " %s: Onlink and interface: %u[%u] does not exist",
__func__, nexthop->ifindex,
nexthop->vrf_id);
return 0;
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
- "\t%s: Onlink and interface %s is not operative",
+ " %s: Onlink and interface %s is not operative",
__func__, ifp->name);
return 0;
}
if (!if_is_operative(ifp)) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
- "\t%s: Interface %s is not unnumbered",
+ " %s: Interface %s is not unnumbered",
__func__, ifp->name);
return 0;
}
&& memcmp(&nexthop->gate.ipv6, &top->p.u.prefix6, 16) == 0)) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
- "\t:%s: Attempting to install a max prefixlength route through itself",
+ " :%s: Attempting to install a max prefixlength route through itself",
__func__);
return 0;
}
zvrf = zebra_vrf_lookup_by_id(nexthop->vrf_id);
if (!table || !zvrf) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
- zlog_debug("\t%s: Table not found", __func__);
+ zlog_debug(" %s: Table not found", __func__);
return 0;
}
|| ((afi == AFI_IP6) && (rn->p.prefixlen != 128))) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
- "\t%s: Matched against ourself and prefix length is not max bit length",
+ " %s: Matched against ourself and prefix length is not max bit length",
__func__);
return 0;
}
&& !rnh_resolve_via_default(zvrf, p.family)) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
- "\t:%s: Resolved against default route",
+ " :%s: Resolved against default route",
__func__);
return 0;
}
re->nexthop_mtu = match->mtu;
if (!resolved && IS_ZEBRA_DEBUG_RIB_DETAILED)
- zlog_debug("\t%s: Recursion failed to find",
- __func__);
+ zlog_debug(
+ " %s: Recursion failed to find",
+ __func__);
return resolved;
} else if (re->type == ZEBRA_ROUTE_STATIC) {
resolved = 0;
if (!resolved && IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
- "\t%s: Static route unable to resolve",
+ " %s: Static route unable to resolve",
__func__);
return resolved;
} else {
if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
zlog_debug(
- "\t%s: Route Type %s has not turned on recursion",
+ " %s: Route Type %s has not turned on recursion",
__func__, zebra_route_string(re->type));
if (re->type == ZEBRA_ROUTE_BGP
&& !CHECK_FLAG(re->flags, ZEBRA_FLAG_IBGP))
zlog_debug(
- "\tEBGP: see \"disable-ebgp-connected-route-check\" or \"disable-connected-check\"");
+ " EBGP: see \"disable-ebgp-connected-route-check\" or \"disable-connected-check\"");
}
return 0;
}
}
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
- zlog_debug("\t%s: Nexthop did not lookup in table", __func__);
+ zlog_debug(" %s: Nexthop did not lookup in table",
+ __func__);
return 0;
}
}
if (!CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE)) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
- zlog_debug("\t%s: Unable to find a active nexthop",
- __func__);
+ zlog_debug(
+ " %s: Unable to find a active nexthop",
+ __func__);
return 0;
}
zvrf = zebra_vrf_lookup_by_id(nexthop->vrf_id);
if (!zvrf) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
- zlog_debug("\t%s: zvrf is NULL", __func__);
+ zlog_debug(" %s: zvrf is NULL", __func__);
return CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE);
}
*prn = rn;
if (!re && IS_ZEBRA_DEBUG_NHT_DETAILED)
- zlog_debug("\tRejected due to removed or is a bgp route");
+ zlog_debug(" Rejected due to removed or is a bgp route");
return re;
}
&& !rnh_resolve_via_default(zvrf, rn->p.family)) {
if (IS_ZEBRA_DEBUG_NHT_DETAILED)
zlog_debug(
- "\tNot allowed to resolve through default prefix");
+ " Not allowed to resolve through default prefix");
return NULL;
}
if (CHECK_FLAG(re->status, ROUTE_ENTRY_REMOVED)) {
if (IS_ZEBRA_DEBUG_NHT_DETAILED)
zlog_debug(
- "\tRoute Entry %s removed",
+ " Route Entry %s removed",
zebra_route_string(re->type));
continue;
}
!CHECK_FLAG(re->flags, ZEBRA_FLAG_FIB_OVERRIDE)) {
if (IS_ZEBRA_DEBUG_NHT_DETAILED)
zlog_debug(
- "\tRoute Entry %s !selected",
+ " Route Entry %s !selected",
zebra_route_string(re->type));
continue;
}
if (CHECK_FLAG(re->status, ROUTE_ENTRY_QUEUED)) {
if (IS_ZEBRA_DEBUG_NHT_DETAILED)
zlog_debug(
- "\tRoute Entry %s queued",
+ " Route Entry %s queued",
zebra_route_string(re->type));
continue;
}
if (nexthop == NULL) {
if (IS_ZEBRA_DEBUG_NHT_DETAILED)
zlog_debug(
- "\tRoute Entry %s no nexthops",
+ " Route Entry %s no nexthops",
zebra_route_string(re->type));
continue;
}
else {
if (IS_ZEBRA_DEBUG_NHT_DETAILED)
zlog_debug(
- "\tNexthop must be connected, cannot recurse up");
+ " Nexthop must be connected, cannot recurse up");
return NULL;
}
}
zvrf = vrf_info_lookup(zvni->vxlan_if->vrf_id);
if (!zvrf) {
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("\tUnable to find vrf for: %d",
+ zlog_debug(" Unable to find vrf for: %d",
zvni->vxlan_if->vrf_id);
return -1;
}
if (!mac_different && is_router == cur_is_router) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "\tIgnoring entry mac is the same and is_router == cur_is_router");
+ " Ignoring entry mac is the same and is_router == cur_is_router");
n->ifindex = ifp->ifindex;
return 0;
}
else {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "\tNeighbor active and frozen");
+ " Neighbor active and frozen");
}
return 0;
}
n->flags, n->loc_seq);
} else {
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("\tNeighbor on hold not sending");
+ zlog_debug(" Neighbor on hold not sending");
}
return 0;
}
if (!zvni) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "\tAdd/Update %sMAC %s intf %s(%u) VID %u, could not find VNI",
+ " Add/Update %sMAC %s intf %s(%u) VID %u, could not find VNI",
sticky ? "sticky " : "",
prefix_mac2str(macaddr, buf, sizeof(buf)),
ifp->name, ifp->ifindex, vid);
if (!zvni->vxlan_if) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "\tVNI %u hash %p doesn't have intf upon local MAC ADD",
+ " VNI %u hash %p doesn't have intf upon local MAC ADD",
zvni->vni, zvni);
return -1;
}
zvrf = vrf_info_lookup(zvni->vxlan_if->vrf_id);
if (!zvrf) {
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("\tNo Vrf found for vrf_id: %d",
+ zlog_debug(" No Vrf found for vrf_id: %d",
zvni->vxlan_if->vrf_id);
return -1;
}
&& mac->fwd_info.local.vid == vid) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "\tAdd/Update %sMAC %s intf %s(%u) VID %u -> VNI %u, "
+ " Add/Update %sMAC %s intf %s(%u) VID %u -> VNI %u, "
"entry exists and has not changed ",
sticky ? "sticky " : "",
prefix_mac2str(macaddr, buf,