summaryrefslogtreecommitdiff
path: root/source/slang-record-replay/util/record-utility.cpp
diff options
context:
space:
mode:
authorkaizhangNV <149626564+kaizhangNV@users.noreply.github.com>2024-07-31 15:03:27 -0500
committerGitHub <noreply@github.com>2024-07-31 13:03:27 -0700
commitbab4b821dc6bcee4ff86751743762584c17e9103 (patch)
treef67eb2e1d4825cc45808cca285b0936b3f25827f /source/slang-record-replay/util/record-utility.cpp
parent93a3ba812dd33b10f166f9172bd781e84d938e21 (diff)
Feature/replayer (#4750)
* record/replay: Implement the json consumer Finish the implementation of json consumer. Fix some bug in the block processing as Tailer is not a necessary block so if the Magic bit is "HEAD", we should keep processing. * record/replay: Implement the replayer component Implement the replayer consumer, and also finish the slang-replay standalone app that will run the while replayer. It can take an option "--convert-json | -cj" which will convert the record binary file to a human readable json file. If there is no option provided, it will replay the record file by default. TODO: #4764 is created to remove the std::filesystem usage.
Diffstat (limited to 'source/slang-record-replay/util/record-utility.cpp')
-rw-r--r--source/slang-record-replay/util/record-utility.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/slang-record-replay/util/record-utility.cpp b/source/slang-record-replay/util/record-utility.cpp
index 8bf89ea67..ea7618e81 100644
--- a/source/slang-record-replay/util/record-utility.cpp
+++ b/source/slang-record-replay/util/record-utility.cpp
@@ -6,6 +6,7 @@
#include <mutex>
#include "record-utility.h"
+#include "../../core/slang-string-util.h"
constexpr const char* kRecordLayerEnvVar = "SLANG_RECORD_LAYER";
constexpr const char* kRecordLayerLogLevel = "SLANG_RECORD_LOG_LEVEL";
@@ -74,9 +75,13 @@ namespace SlangRecord
return;
}
+ Slang::StringBuilder builder;
+
va_list args;
va_start(args, fmt);
- vfprintf(stdout, fmt, args);
+ Slang::StringUtil::append(fmt, args, builder);
va_end(args);
+
+ fprintf(stdout, "[slang-record-replay]: %s", builder.begin());
}
}