mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 02:51:16 +00:00
* src/libvirt.c: convert entry points to new logging
daniel
This commit is contained in:
parent
698d80a824
commit
f99b202f5b
@ -1,3 +1,7 @@
|
||||
Mon Dec 22 11:45:07 CET 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/libvirt.c: convert entry points to new logging
|
||||
|
||||
Mon Dec 22 11:43:04 CET 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/logging.h src/logging.c: commited the more recent version
|
||||
|
@ -257,8 +257,22 @@ virInitialize(void)
|
||||
|
||||
#ifdef ENABLE_DEBUG
|
||||
debugEnv = getenv("LIBVIRT_DEBUG");
|
||||
if (debugEnv && *debugEnv && *debugEnv != '0')
|
||||
debugFlag = 1;
|
||||
if (debugEnv && *debugEnv && *debugEnv != '0') {
|
||||
if (STREQ(debugEnv, "2") || STREQ(debugEnv, "info"))
|
||||
virLogSetDefaultPriority(VIR_LOG_INFO);
|
||||
else if (STREQ(debugEnv, "3") || STREQ(debugEnv, "warning"))
|
||||
virLogSetDefaultPriority(VIR_LOG_WARN);
|
||||
else if (STREQ(debugEnv, "4") || STREQ(debugEnv, "error"))
|
||||
virLogSetDefaultPriority(VIR_LOG_ERROR);
|
||||
else
|
||||
virLogSetDefaultPriority(VIR_LOG_DEBUG);
|
||||
}
|
||||
debugEnv = getenv("LIBVIRT_LOG_FILTERS");
|
||||
if (debugEnv)
|
||||
virLogParseFilters(debugEnv);
|
||||
debugEnv = getenv("LIBVIRT_LOG_OUTPUTS");
|
||||
if (debugEnv)
|
||||
virLogParseOutputs(debugEnv);
|
||||
#endif
|
||||
|
||||
DEBUG0("register drivers");
|
||||
|
Loading…
Reference in New Issue
Block a user