Collect startup output before logging it
[fio.git] / backend.c
index 8fec1ce3141f4f5b3f910784c75f5f6a200c88d9..00fc29a4b15452778b38f4d9a0c3bee6a574e8ba 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -2213,18 +2213,21 @@ static void run_threads(struct sk_out *sk_out)
        }
 
        if (output_format & FIO_OUTPUT_NORMAL) {
-               log_info("Starting ");
+               struct buf_output out;
+
+               buf_output_init(&out);
+               log_buf(&out, "Starting ");
                if (nr_thread)
-                       log_info("%d thread%s", nr_thread,
+                       log_buf(&out, "%d thread%s", nr_thread,
                                                nr_thread > 1 ? "s" : "");
                if (nr_process) {
                        if (nr_thread)
-                               log_info(" and ");
-                       log_info("%d process%s", nr_process,
+                               log_buf(&out, " and ");
+                       log_buf(&out, "%d process%s", nr_process,
                                                nr_process > 1 ? "es" : "");
                }
-               log_info("\n");
-               log_info_flush();
+               log_buf(&out, "\n");
+               log_info_buf(out.buf, out.buflen);
        }
 
        todo = thread_number;