mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virlog: Split parsing and setting priority
Handling of outputs and filters has been changed in a way that splits parsing and defining. Do the same thing for logging priority as well, this however, doesn't need much of a preparation. Signed-off-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
@@ -311,7 +311,8 @@ mymain(void)
|
||||
if (virThreadInitialize() < 0)
|
||||
return EXIT_FAILURE;
|
||||
char *debugEnv = getenv("LIBVIRT_DEBUG");
|
||||
if (debugEnv && *debugEnv && (virLogParseDefaultPriority(debugEnv) == -1)) {
|
||||
if (debugEnv && *debugEnv &&
|
||||
(virLogSetDefaultPriority(virLogParseDefaultPriority(debugEnv)) < 0)) {
|
||||
fprintf(stderr, "Invalid log level setting.\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user