diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2010-11-18 13:14:08 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2010-11-23 14:09:52 +0000 |
commit | 04bd0360f32ec628ecf7943b3fd1468d6eb2dde5 (patch) | |
tree | ec7c147ad9d0da4fd926151b035c8d7937c6484d | |
parent | Ensure virExec preserves logging environment (diff) | |
download | libvirt-04bd0360f32ec628ecf7943b3fd1468d6eb2dde5.tar.gz libvirt-04bd0360f32ec628ecf7943b3fd1468d6eb2dde5.tar.bz2 libvirt-04bd0360f32ec628ecf7943b3fd1468d6eb2dde5.zip |
Log all errors at level INFO to stop polluting syslog
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
-rw-r--r-- | src/util/virterror.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/util/virterror.c b/src/util/virterror.c index 9757fd423..83c4c9dcf 100644 --- a/src/util/virterror.c +++ b/src/util/virterror.c @@ -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); /* |