From 254e5134d9338f0d20f47b30d9ad0934fc7fe93b Mon Sep 17 00:00:00 2001 From: Sam Tannous Date: Tue, 8 Jul 2014 15:15:39 -0400 Subject: [PATCH] lldpd: fix log_info Currently none of the log_info msgs are getting printed into syslog. vlog already does the right checks. Remove the checks in log_info which is making all default log_info prints no-ops Also change severity of "interface reset timer" msg Signed-off-by: Roopa Prabhu Signed-off-by: Sam Tannous --- src/daemon/lldpd.c | 2 +- src/log.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/daemon/lldpd.c b/src/daemon/lldpd.c index cc113e35..5c197488 100644 --- a/src/daemon/lldpd.c +++ b/src/daemon/lldpd.c @@ -315,7 +315,7 @@ lldpd_reset_timer(struct lldpd *cfg) cksum = frame_checksum(output, output_len, 0); free(output); if (cksum != hardware->h_lport_cksum) { - log_info("localchassis", + log_debug("localchassis", "change detected for port %s, resetting its timer", hardware->h_ifname); hardware->h_lport_cksum = cksum; diff --git a/src/log.c b/src/log.c index 5a1db221..4a1647e7 100644 --- a/src/log.c +++ b/src/log.c @@ -195,11 +195,9 @@ log_info(const char *token, const char *emsg, ...) { va_list ap; - if (debug > 1 || logh) { - va_start(ap, emsg); - vlog(LOG_INFO, token, emsg, ap); - va_end(ap); - } + va_start(ap, emsg); + vlog(LOG_INFO, token, emsg, ap); + va_end(ap); } static int -- 2.39.5