syslog: use appropriate levels for logging
authorChristian Mehlis <christian@m3hlis.de>
Thu, 26 Mar 2015 13:51:21 +0000 (14:51 +0100)
committerJohn Crispin <blogic@openwrt.org>
Fri, 27 Mar 2015 13:20:50 +0000 (14:20 +0100)
Signed-off-by: Christian Mehlis <christian@m3hlis.de>
kmodloader.c
log/logread.c

index 8f41e749c7f3edc492f3b86abd1778efcdf1dc95..387678ada91ffef3c9ba9bdf5f62a915bc72e6a7 100644 (file)
@@ -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;
index a7ab567a9fa0bbd0f6c4b8072f7e35b9128d332c..871cd5bffe9a855209a45e50f4ccad20dd0dadec 100644 (file)
@@ -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);