mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-22 14:50:27 +03:00
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
This commit is contained in:
parent
882f78c3cb
commit
04bd0360f3
@ -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);
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user