]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpd: fix log_info
authorSam Tannous <stannous@cumulusnetworks.com>
Tue, 8 Jul 2014 19:15:39 +0000 (15:15 -0400)
committerVincent Bernat <vincent@bernat.im>
Tue, 8 Jul 2014 19:40:03 +0000 (21:40 +0200)
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 <roopa@cumulusnetworks.com>
Signed-off-by: Sam Tannous <stannous@cumulusnetworks.com>
src/daemon/lldpd.c
src/log.c

index cc113e35ec40db9ed48e78861e0003e1da592d6b..5c197488f7ed7a7d4bb3f92682240d0f30ccbed8 100644 (file)
@@ -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;
index 5a1db2215d057467354f87b098544d311c4f2cc0..4a1647e7548bda8391b9c8e1ed2d60950661e91b 100644 (file)
--- 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