Skip to content

Commit 973f30b

Browse files
joyeecheungnodejs-github-bot
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 ef5c8e4 commit 973f30b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/node_realm.cc

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ ExitCode SnapshotBuilder::CreateSnapshot(SnapshotData* out,
10751075

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

10811081
// Serialize the native states

0 commit comments

Comments
 (0)