Initializing libvirt log in virt-aa-helper and getting it to output
libvirt log to stderr. This will help debugging problems happening in
libvirt functions called from within virt-aa-helper
}
}
+ virCommandAddEnvFormat(cmd,
+ "LIBVIRT_LOG_OUTPUTS=%d:stderr",
+ virLogGetDefaultPriority());
+
virCommandSetInputBuffer(cmd, xml);
rc = virCommandRun(cmd, NULL);
#include "virbuffer.h"
#include "viralloc.h"
#include "vircommand.h"
+#include "virlog.h"
#include "security_driver.h"
#include "security_apparmor.h"
exit(EXIT_FAILURE);
}
+ /* Initialize the log system */
+ virLogSetFromEnv();
+
/* clear the environment */
environ = NULL;
if (setenv("PATH", "/sbin:/usr/sbin", 1) != 0)