+/* Format and log MSG somewhere sensible, at the syslog(3) priority PRIO.
+ * Prefix it with a description of the query Q, if non-null.
+ */
+void logmsg(const struct query *q, int prio, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ vlogmsg(q, prio, msg, &ap);
+ va_end(ap);
+}
+
+/* Format and report MSG as a fatal error, and exit. */
+void fatal(const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ vlogmsg(0, LOG_CRIT, msg, &ap);
+ va_end(ap);
+ exit(1);
+}
+