]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Do not log invalid operations in libvirtd logs
authorDaniel Veillard <veillard@redhat.com>
Tue, 13 Sep 2011 10:24:13 +0000 (18:24 +0800)
committerDaniel Veillard <veillard@redhat.com>
Tue, 13 Sep 2011 10:24:13 +0000 (18:24 +0800)
  This is a bit painful for example when starting virt-manager
it tends to clutter libvirtd.log with invalid operation on cpu pinning
for defined but not running domains. A priori those kind of errors
don't indicate an error when executing the command but on a precondition
for running the API, and honnestly while the application should report
it, logging it as an error in libvirtd.log is not really useful,

   Related bug: https://bugzilla.redhat.com/show_bug.cgi?id=590807

* daemon/libvirtd.c: extend daemonErrorLogFilter() to filter out
   errors of type VIR_ERR_OPERATION_INVALID

daemon/libvirtd.c

index 1a9fd82d96ff29d3596828f42d23dba635e4ead8..c708ff76a45b36c009fa0275ae92ce18dcd1fe7d 100644 (file)
@@ -357,6 +357,7 @@ static int daemonErrorLogFilter(virErrorPtr err, int priority)
     case VIR_ERR_NO_NWFILTER:
     case VIR_ERR_NO_SECRET:
     case VIR_ERR_NO_DOMAIN_SNAPSHOT:
+    case VIR_ERR_OPERATION_INVALID:
         return VIR_LOG_DEBUG;
     }