<dd>The line number of the file emitting the log record</dd>
<dt><code>CODE_FUNC</code></dt>
<dd>The name of the function emitting the log record</dd>
+ <dt><code>LIBVIRT_DOMAIN</code></dt>
+ <dd>The libvirt error domain (values from virErrorDomain enum), if LIBVIRT_SOURCE="error"</dd>
+ <dt><code>LIBVIRT_CODE</code></dt>
+ <dd>The libvirt error code (values from virErrorCode enum), if LIBVIRT_SOURCE="error"</dd>
</dl>
<h2>
virErrorPtr to;
char *str;
int priority;
+ virLogMetadata meta[] = {
+ { .key = "LIBVIRT_DOMAIN", .s = NULL, .iv = domain },
+ { .key = "LIBVIRT_CODE", .s = NULL, .iv = code },
+ { .key = NULL },
+ };
/*
* All errors are recorded in thread local storage
priority = virErrorLevelPriority(level);
if (virErrorLogPriorityFilter)
priority = virErrorLogPriorityFilter(to, priority);
+
virLogMessage(virErrorLogPriorityFilter ? VIR_LOG_FROM_FILE : VIR_LOG_FROM_ERROR,
priority,
filename, linenr, funcname,
- NULL, "%s", str);
+ meta, "%s", str);
errno = save_errno;
}