]> xenbits.xensource.com Git - libvirt.git/commitdiff
Log all errors at level INFO to stop polluting syslog
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 18 Nov 2010 13:14:08 +0000 (13:14 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 23 Nov 2010 14:09:52 +0000 (14:09 +0000)
Everytime a public API returns an error, libvirtd pollutes
syslog with that error message. Reduce the error logging
level to INFO so these don't appear by default.

* src/util/virterror.c: Log all errors at INFO

src/util/virterror.c

index 9757fd423ffe2c3fc367d26c5a25db5662366885..83c4c9dcf0c78122ec0496de68e8237eb4309749 100644 (file)
@@ -64,18 +64,6 @@ void *virUserData = NULL;        /* associated data */
     }}                                                         \
 }
 
-static virLogPriority virErrorLevelPriority(virErrorLevel level) {
-    switch (level) {
-        case VIR_ERR_NONE:
-            return(VIR_LOG_INFO);
-        case VIR_ERR_WARNING:
-            return(VIR_LOG_WARN);
-        case VIR_ERR_ERROR:
-            return(VIR_LOG_ERROR);
-    }
-    return(VIR_LOG_ERROR);
-}
-
 static const char *virErrorDomainName(virErrorDomain domain) {
     const char *dom = "unknown";
     switch (domain) {
@@ -716,7 +704,7 @@ virRaiseErrorFull(virConnectPtr conn ATTRIBUTE_UNUSED,
      * Hook up the error or warning to the logging facility
      * XXXX should we include filename as 'category' instead of domain name ?
      */
-    virLogMessage(virErrorDomainName(domain), virErrorLevelPriority(level),
+    virLogMessage(virErrorDomainName(domain), VIR_LOG_INFO,
                   funcname, linenr, 1, "%s", str);
 
     /*