diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-03-02 11:15:33 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-03-02 11:15:33 +0100 |
commit | df25d292130839218fa7c812a62ee300aab46746 (patch) | |
tree | 2ea08187663ac741326886306efc3fbfbf51f7a9 /ospfd | |
parent | Merge pull request #1784 from donaldsharp/documentation (diff) | |
download | frr-df25d292130839218fa7c812a62ee300aab46746.tar.xz frr-df25d292130839218fa7c812a62ee300aab46746.zip |
ospfd: Cleanup ospf SR log messages
When OSPF SR is not configured one would expect
to not see any output from it at all in the debug
log with no debugs turned on.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ospf_sr.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c index 1560977ae..1a68eda6c 100644 --- a/ospfd/ospf_sr.c +++ b/ospfd/ospf_sr.c @@ -306,7 +306,8 @@ int ospf_sr_init(void) { int rc = -1; - zlog_info("SR (%s): Initialize SR Data Base", __func__); + if (IS_DEBUG_OSPF_SR) + zlog_info("SR (%s): Initialize SR Data Base", __func__); memset(&OspfSR, 0, sizeof(struct ospf_sr_db)); OspfSR.enabled = false; @@ -1616,11 +1617,11 @@ static int ospf_sr_update_schedule(struct thread *t) monotime(&stop_time); - zlog_info( - "SR (%s): SPF Processing Time(usecs): %lld\n", - __func__, - (stop_time.tv_sec - start_time.tv_sec) * 1000000LL - + (stop_time.tv_usec - start_time.tv_usec)); + if (IS_DEBUG_OSPF_SR) + zlog_debug("SR (%s): SPF Processing Time(usecs): %lld\n", + __func__, + (stop_time.tv_sec - start_time.tv_sec) * 1000000LL + + (stop_time.tv_usec - start_time.tv_usec)); OspfSR.update = false; return 1; |