提交 f99b202f 编写于 作者: D Daniel Veillard

* src/libvirt.c: convert entry points to new logging

daniel
上级 698d80a8
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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册