udev-config: restore log level set by systemd.log_level on reload
If previously log level was specified in udev.conf but not now, then let's make 'udevadm control --reload' sets the log level specified by systemd.log_level.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
#define WORKER_NUM_MAX UINT64_C(2048)
|
||||
|
||||
static int default_log_level = LOG_INFO;
|
||||
static bool arg_debug = false;
|
||||
bool arg_daemonize = false;
|
||||
|
||||
@@ -279,7 +280,7 @@ static void manager_merge_config_log_level(Manager *manager) {
|
||||
if (manager->config.trace)
|
||||
manager->config.log_level = LOG_DEBUG;
|
||||
else
|
||||
MERGE_NON_NEGATIVE(log_level, log_get_max_level());
|
||||
MERGE_NON_NEGATIVE(log_level, default_log_level);
|
||||
}
|
||||
|
||||
static void manager_merge_config(Manager *manager) {
|
||||
@@ -441,6 +442,8 @@ int manager_load(Manager *manager, int argc, char *argv[]) {
|
||||
|
||||
assert(manager);
|
||||
|
||||
default_log_level = log_get_max_level();
|
||||
|
||||
manager_parse_udev_config(&manager->config_by_udev_conf);
|
||||
|
||||
r = parse_argv(argc, argv, &manager->config_by_command);
|
||||
|
||||
Reference in New Issue
Block a user