Harald Hoyer fe20ad
From 0e842bc91f0a60d06aecf23d5881773d5c66af59 Mon Sep 17 00:00:00 2001
Harald Hoyer fe20ad
From: Tom Gundersen <teg@jklm.no>
Harald Hoyer fe20ad
Date: Thu, 8 Aug 2013 21:44:02 +0200
Harald Hoyer fe20ad
Subject: [PATCH] udevd: respect the log-level set in /etc/udev/udev.conf
Harald Hoyer fe20ad
Harald Hoyer fe20ad
A regression introduced when we moved to systemd's logging is that the only
Harald Hoyer fe20ad
way to adjust the log-level of the udev daemon is via the env var, kernel
Harald Hoyer fe20ad
commandline or the commandline.
Harald Hoyer fe20ad
Harald Hoyer fe20ad
This reintroduces support for specifying this in the configuration file.
Harald Hoyer fe20ad
---
Harald Hoyer fe20ad
 src/udev/udevd.c | 3 +++
Harald Hoyer fe20ad
 1 file changed, 3 insertions(+)
Harald Hoyer fe20ad
Harald Hoyer fe20ad
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
Harald Hoyer fe20ad
index 45ec3d6..7c6c5d6 100644
Harald Hoyer fe20ad
--- a/src/udev/udevd.c
Harald Hoyer fe20ad
+++ b/src/udev/udevd.c
Harald Hoyer fe20ad
@@ -923,7 +923,10 @@ int main(int argc, char *argv[])
Harald Hoyer fe20ad
         log_set_target(LOG_TARGET_AUTO);
Harald Hoyer fe20ad
         log_parse_environment();
Harald Hoyer fe20ad
         log_open();
Harald Hoyer fe20ad
+
Harald Hoyer fe20ad
         udev_set_log_fn(udev, udev_main_log);
Harald Hoyer fe20ad
+        log_set_max_level(udev_get_log_priority(udev));
Harald Hoyer fe20ad
+
Harald Hoyer fe20ad
         log_debug("version %s\n", VERSION);
Harald Hoyer fe20ad
         label_init("/dev");
Harald Hoyer fe20ad