chiark / gitweb /
path-lookup: downgrade again the messages where we log for units
authorLennart Poettering <lennart@poettering.net>
Fri, 1 Mar 2013 13:07:20 +0000 (14:07 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 1 Mar 2013 13:07:20 +0000 (14:07 +0100)
This partially reverts 7ad94c716d6403233d04c4d37cb14df958c9b65d.

After that commit commands such as "systemctl enable" and friends
printed the search path information multiple times in its output, which
is ugly.

If we want the search paths to be printed at a higher log level, then we
should do this in PID 1 only, i.e. split the printing out of the normal
path lookup logic and invoke that explicitly from PID 1 but not in the
auxiliary tools.

src/shared/path-lookup.c

index ffdc5367cb79bf6f416f6950eedc75ebaff31d62..6bb390fc9056b72255838934f4cdf8e181189424 100644 (file)
@@ -325,9 +325,9 @@ int lookup_paths_init(
                 char _cleanup_free_ *t = strv_join(p->unit_path, "\n\t");
                 if (!t)
                         return -ENOMEM;
-                log_info("Looking for unit files in (higher priority first):\n\t%s", t);
+                log_debug("Looking for unit files in (higher priority first):\n\t%s", t);
         } else {
-                log_info("Ignoring unit files.");
+                log_debug("Ignoring unit files.");
                 strv_free(p->unit_path);
                 p->unit_path = NULL;
         }
@@ -385,9 +385,9 @@ int lookup_paths_init(
                         char _cleanup_free_ *t = strv_join(p->sysvinit_path, "\n\t");
                         if (!t)
                                 return -ENOMEM;
-                        log_info("Looking for SysV init scripts in:\n\t%s", t);
+                        log_debug("Looking for SysV init scripts in:\n\t%s", t);
                 } else {
-                        log_info("Ignoring SysV init scripts.");
+                        log_debug("Ignoring SysV init scripts.");
                         strv_free(p->sysvinit_path);
                         p->sysvinit_path = NULL;
                 }
@@ -405,7 +405,7 @@ int lookup_paths_init(
                         p->sysvrcnd_path = NULL;
                 }
 #else
-                log_info("SysV init scripts and rcN.d links support disabled");
+                log_debug("SysV init scripts and rcN.d links support disabled");
 #endif
         }