[OpenWrt-Devel] [PATCH] syslog: use appropriate levels for logging
Christian Mehlis
christian at m3hlis.de
Thu Mar 26 09:51:21 EDT 2015
Signed-off-by: Christian Mehlis <christian at m3hlis.de>
---
kmodloader.c | 2 +-
log/logread.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kmodloader.c b/kmodloader.c
index 8f41e74..387678a 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -751,7 +751,7 @@ static int main_loader(int argc, char **argv)
if (scan_module_folders())
return -1;
- syslog(0, "kmodloader: loading kernel modules from %s\n", path);
+ syslog(LOG_INFO, "kmodloader: loading kernel modules from %s\n", path);
if (glob(path, gl_flags, NULL, &gl) < 0)
goto out;
diff --git a/log/logread.c b/log/logread.c
index a7ab567..871cd5b 100644
--- a/log/logread.c
+++ b/log/logread.c
@@ -79,7 +79,7 @@ static void log_handle_reconnect(struct uloop_timeout *timeout)
uloop_timeout_set(&retry, 1000);
} else {
uloop_fd_add(&sender, ULOOP_READ);
- syslog(0, "Logread connected to %s:%s\n", log_ip, log_port);
+ syslog(LOG_INFO, "Logread connected to %s:%s\n", log_ip, log_port);
}
}
@@ -154,7 +154,7 @@ static int log_notify(struct blob_attr *msg)
err = send(sender.fd, buf, strlen(buf), 0);
if (err < 0) {
- syslog(0, "failed to send log data to %s:%s via %s\n",
+ syslog(LOG_INFO, "failed to send log data to %s:%s via %s\n",
log_ip, log_port, (log_udp) ? ("udp") : ("tcp"));
uloop_fd_delete(&sender);
close(sender.fd);
--
2.3.4.263.gf53fc38
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list