treewide: rework prio of syslog messages
authorHans Dedecker <dedeckeh@gmail.com>
Mon, 23 Jan 2017 16:29:43 +0000 (17:29 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Mon, 23 Jan 2017 16:32:09 +0000 (17:32 +0100)
Rework prio of syslog messages allowing to filter out the relevant messages
by setting the correct log level

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
src/dhcpv4.c
src/ndp.c

index 3fca8865be46cea11ecc6e541b2501fcbb7da1c6..5ef99b13f317fedd6196455f81f54b0ed5461445 100644 (file)
@@ -540,7 +540,7 @@ static bool dhcpv4_assign(struct interface *iface,
        if (start <= raddr && raddr <= end && dhcpv4_test(iface, raddr)) {
                assign->addr = raddr;
                list_add(&assign->head, &iface->dhcpv4_assignments);
-               syslog(LOG_DEBUG, "assigning the IP the client asked for: %u.%u.%u.%u",
+               syslog(LOG_INFO, "assigning the IP the client asked for: %u.%u.%u.%u",
                                (assign->addr & 0xff000000) >> 24,
                                (assign->addr & 0x00ff0000) >> 16,
                                (assign->addr & 0x0000ff00) >> 8,
@@ -563,7 +563,7 @@ static bool dhcpv4_assign(struct interface *iface,
        if (list_empty(&iface->dhcpv4_assignments)) {
                assign->addr = try;
                list_add(&assign->head, &iface->dhcpv4_assignments);
-               syslog(LOG_DEBUG, "assigning mapped IP (empty list): %u.%u.%u.%u",
+               syslog(LOG_INFO, "assigning mapped IP (empty list): %u.%u.%u.%u",
                                (assign->addr & 0xff000000) >> 24,
                                (assign->addr & 0x00ff0000) >> 16,
                                (assign->addr & 0x0000ff00) >> 8,
@@ -586,7 +586,7 @@ static bool dhcpv4_assign(struct interface *iface,
                try = (((try - start) + 1) % count) + start;
        }
 
-       syslog(LOG_DEBUG, "can't assign any IP address -> address space is full");
+       syslog(LOG_WARNING, "can't assign any IP address -> address space is full");
        return false;
 }
 
index 30ebaf4b13456e028c25f250d02775b47c4161fc..10acc3b6dc61d8dd8fff6046088e2c4e70141bbf 100644 (file)
--- a/src/ndp.c
+++ b/src/ndp.c
@@ -328,7 +328,7 @@ static void check_updates(struct interface *iface)
                dhcpv6_ia_postupdate(iface, now);
 
        if (change) {
-               syslog(LOG_DEBUG, "Raising SIGUSR1 due to address change");
+               syslog(LOG_INFO, "Raising SIGUSR1 due to address change on %s", iface->ifname);
                raise(SIGUSR1);
        }
 }
@@ -363,7 +363,7 @@ static void handle_rtnetlink(_unused void *addr, void *data, size_t len,
                if (is_route) {
                        // Inform about a change in default route
                        if (rtm->rtm_dst_len == 0) {
-                               syslog(LOG_DEBUG, "Raising SIGUSR1 due to default route change");
+                               syslog(LOG_INFO, "Raising SIGUSR1 due to default route change");
                                raise(SIGUSR1);
                        }