Skip to content

Commit 6df3e31

Browse files
joyeecheungrichardlau
authored andcommitted
src: print MKSNAPSHOT debug logs to stderr
PR-URL: #50759 Refs: #50740 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
1 parent 6fc6a62 commit 6df3e31

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/node_realm.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ void Realm::PrintInfoForSnapshot() {
223223
fprintf(stderr, "BaseObjects of the Realm:\n");
224224
size_t i = 0;
225225
ForEachBaseObject([&](BaseObject* obj) {
226-
std::cout << "#" << i++ << " " << obj << ": " << obj->MemoryInfoName()
226+
std::cerr << "#" << i++ << " " << obj << ": " << obj->MemoryInfoName()
227227
<< "\n";
228228
});
229229

src/node_snapshotable.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ ExitCode SnapshotBuilder::CreateSnapshot(SnapshotData* out,
10741074

10751075
if (per_process::enabled_debug_list.enabled(DebugCategory::MKSNAPSHOT)) {
10761076
env->ForEachRealm([](Realm* realm) { realm->PrintInfoForSnapshot(); });
1077-
printf("Environment = %p\n", env);
1077+
fprintf(stderr, "Environment = %p\n", env);
10781078
}
10791079

10801080
// Serialize the native states

0 commit comments

Comments
 (0)