udev: setting the same log level to SYSTEMD realm

Otherwise, many debug logs from libsystemd are dropped.
This commit is contained in:
Yu Watanabe 2018-10-26 09:45:35 +09:00
parent a5db6debcd
commit 6174a243f9
3 changed files with 3 additions and 2 deletions

View File

@ -80,8 +80,6 @@ static int parse_argv(int argc, char *argv[]) {
int hwdb_main(int argc, char *argv[], void *userdata) {
int r;
log_set_max_level_realm(LOG_REALM_SYSTEMD, log_get_max_level());
r = parse_argv(argc, argv);
if (r <= 0)
return r;

View File

@ -112,6 +112,7 @@ int main(int argc, char *argv[]) {
udev_parse_config();
log_parse_environment();
log_open();
log_set_max_level_realm(LOG_REALM_SYSTEMD, log_get_max_level());
mac_selinux_init();
r = parse_argv(argc, argv);

View File

@ -1702,6 +1702,8 @@ int main(int argc, char *argv[]) {
log_set_max_level(LOG_DEBUG);
}
log_set_max_level_realm(LOG_REALM_SYSTEMD, log_get_max_level());
r = must_be_root();
if (r < 0)
goto exit;