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
/*
* 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);
domcode, VIR_ERR_NO_MEMORY, VIR_ERR_ERROR,
virerr, NULL, NULL, -1, -1, virerr, NULL);
}
-
-void
-virErrorSetLogPriority(int priority)
-{
- virErrorLogPriority = priority;
-}
int virSetError(virErrorPtr newerr);
void virDispatchError(virConnectPtr conn);
const char *virStrerror(int theerrno, char *errBuf, size_t errBufLen);
-void virErrorSetLogPriority(int priority);
#endif