udevadm: allow to override the default log level by environment variable

Previously, there was no way to override the log level for test and
test-builtin commands. Let's re-parse environment after setting the log
level to debug. Then, we can control the log level through environment
variable.
This commit is contained in:
Yu Watanabe
2024-01-06 08:30:58 +09:00
parent 976309db6a
commit 7ba3e44651
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -78,6 +78,7 @@ int builtin_main(int argc, char *argv[], void *userdata) {
int r;
log_set_max_level(LOG_DEBUG);
log_parse_environment();
r = parse_argv(argc, argv);
if (r <= 0)
+1
View File
@@ -95,6 +95,7 @@ int test_main(int argc, char *argv[], void *userdata) {
int r;
log_set_max_level(LOG_DEBUG);
log_parse_environment();
r = parse_argv(argc, argv);
if (r <= 0)