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:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user