libvirtd: respect LIBVIRT_DEBUG when logging to syslog

This commit is contained in:
John Levon 2009-01-20 21:50:31 +00:00
parent 1709e1dc88
commit 839c6de58b
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,7 @@
Tue Jan 20 13:35:36 PST 2009 John Levon <john.levon@sun.com>
* qemud/qemud.c: respect LIBVIRT_DEBUG when logging to syslog
Tue Jan 20 22:32:44 CET 2009 Daniel Veillard <veillard@redhat.com>
* src/logging.c: fix openlog() ident lifetime for Solaris

View File

@ -2356,10 +2356,15 @@ qemudSetLogging(virConfPtr conf, const char *filename) {
*/
GET_CONF_STR (conf, filename, log_outputs);
if (log_outputs == NULL) {
if (godaemon)
virLogParseOutputs("3:syslog:libvirtd");
else
if (godaemon) {
char *tmp = NULL;
if (virAsprintf (&tmp, "%d:syslog:libvirtd", log_level) < 0)
goto free_and_fail;
virLogParseOutputs (tmp);
VIR_FREE (tmp);
} else {
virLogParseOutputs("0:stderr:libvirtd");
}
} else
virLogParseOutputs(log_outputs);
ret = 0;