Skip to content

Commit

Permalink
src: print MKSNAPSHOT debug logs to stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
joyeecheung committed Nov 16, 2023
1 parent 02db7fc commit 1917823
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 1917823

Please sign in to comment.