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 targos committed Dec 4, 2023
1 parent 1e40c4a commit 74f5a1c
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
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
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 74f5a1c

Please sign in to comment.