Skip to content

Commit

Permalink
src: print MKSNAPSHOT debug logs to stderr
Browse files Browse the repository at this point in the history
PR-URL: #50759
Refs: #50740
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
joyeecheung authored and richardlau committed Mar 25, 2024
1 parent 6fc6a62 commit 6df3e31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/node_realm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void Realm::PrintInfoForSnapshot() {
fprintf(stderr, "BaseObjects of the Realm:\n");
size_t i = 0;
ForEachBaseObject([&](BaseObject* obj) {
std::cout << "#" << i++ << " " << obj << ": " << obj->MemoryInfoName()
std::cerr << "#" << i++ << " " << obj << ": " << obj->MemoryInfoName()
<< "\n";
});

Expand Down
2 changes: 1 addition & 1 deletion src/node_snapshotable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ ExitCode SnapshotBuilder::CreateSnapshot(SnapshotData* out,

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

// Serialize the native states
Expand Down

0 comments on commit 6df3e31

Please sign in to comment.