[PATCH] When logging to a file, stderr should go both to stderr and file
diff --git a/fio.h b/fio.h
index f6c2ee3..2d57227 100644
--- a/fio.h
+++ b/fio.h
@@ -441,4 +441,13 @@
 	(*sem)++;
 }
 
+/*
+ * If logging output to a file, stderr should go to both stderr and f_err
+ */
+#define log_err(args...)	do {		\
+	fprintf(f_err, ##args);			\
+	if (f_err != stderr)			\
+		fprintf(stderr, ##args);	\
+	} while (0)
+
 #endif