From da660c752d1c177934a01e28c68368879523b74d Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Mon, 23 Jan 2017 17:29:43 +0100 Subject: [PATCH] treewide: rework prio of syslog messages Rework prio of syslog messages allowing to filter out the relevant messages by setting the correct log level Signed-off-by: Hans Dedecker --- src/dhcpv4.c | 6 +++--- src/ndp.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dhcpv4.c b/src/dhcpv4.c index 3fca886..5ef99b1 100644 --- a/src/dhcpv4.c +++ b/src/dhcpv4.c @@ -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; } diff --git a/src/ndp.c b/src/ndp.c index 30ebaf4..10acc3b 100644 --- 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); } -- 2.30.2