#include "log.h"
#include <stdio.h>
+#include <string.h>
#include <stdarg.h>
#include <syslog.h>
#include <assert.h>
+#include <errno.h>
#include <string>
#include <vector>
}
}
}
+
+void log_perror(const char *msg)
+{
+ char errbuf[4096];
+ log(ERROR, "%s: %s", msg, strerror_r(errno, errbuf, sizeof(errbuf)));
+}