mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-13 08:58:33 +03:00
Revert all previous error log priority hacks
This reverts the additions in commit abff683f78ffd01df5005fb7a457c0b38b8eb6e1 taking us back to state where all errors are fully logged in both libvirtd and normal clients. THe intent was to stop VIR_ERR_NO_DOMAIN (No such domain with UUID XXXX) messages from client apps polluting syslog The change affected all error codes, but more seriously, it also impacted errors from internal libvirtd infrastructure For example guest autostart no longer logged errors. The libvirtd network code no longer logged some errors. This makes debugging incredibly hard * daemon/libvirtd.c: Remove error log priority filter * src/util/virterror.c, src/util/virterror_internal.h: Remove callback for overriding log priority
This commit is contained in:
parent
2b7ac8838d
commit
dbfca3ff70
@ -3103,10 +3103,6 @@ int main(int argc, char **argv) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Set error logging priority to debug, so client errors don't
|
||||
* show up as errors in the daemon log */
|
||||
virErrorSetLogPriority(VIR_LOG_DEBUG);
|
||||
|
||||
while (1) {
|
||||
int optidx = 0;
|
||||
int c;
|
||||
|
@ -918,7 +918,6 @@ virAuditSend;
|
||||
# virterror_internal.h
|
||||
virDispatchError;
|
||||
virErrorMsg;
|
||||
virErrorSetLogPriority;
|
||||
virRaiseErrorFull;
|
||||
virReportErrorHelper;
|
||||
virReportOOMErrorFull;
|
||||
|
@ -26,7 +26,6 @@ virThreadLocal virLastErr;
|
||||
|
||||
virErrorFunc virErrorHandler = NULL; /* global error handler */
|
||||
void *virUserData = NULL; /* associated data */
|
||||
static int virErrorLogPriority = -1;
|
||||
|
||||
/*
|
||||
* Macro used to format the message as a string in virRaiseError
|
||||
@ -725,13 +724,8 @@ 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 ?
|
||||
*
|
||||
* When an explicit error log priority is set then use it, otherwise
|
||||
* translate the error level to the log priority. This is used by libvirtd
|
||||
* to log client errors at debug priority.
|
||||
*/
|
||||
priority = virErrorLogPriority == -1 ? virErrorLevelPriority(level)
|
||||
: virErrorLogPriority;
|
||||
priority = virErrorLevelPriority(level);
|
||||
virLogMessage(virErrorDomainName(domain), priority,
|
||||
funcname, linenr, 1, "%s", str);
|
||||
|
||||
@ -1341,9 +1335,3 @@ void virReportOOMErrorFull(int domcode,
|
||||
domcode, VIR_ERR_NO_MEMORY, VIR_ERR_ERROR,
|
||||
virerr, NULL, NULL, -1, -1, virerr, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
virErrorSetLogPriority(int priority)
|
||||
{
|
||||
virErrorLogPriority = priority;
|
||||
}
|
||||
|
@ -89,6 +89,5 @@ void virReportOOMErrorFull(int domcode,
|
||||
int virSetError(virErrorPtr newerr);
|
||||
void virDispatchError(virConnectPtr conn);
|
||||
const char *virStrerror(int theerrno, char *errBuf, size_t errBufLen);
|
||||
void virErrorSetLogPriority(int priority);
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user