diff --git a/src/node_realm.cc b/src/node_realm.cc index 23fb6bd55213ee..6262ed8cde59f2 100644 --- a/src/node_realm.cc +++ b/src/node_realm.cc @@ -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"; }); diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc index 562a47ddcc9c8e..0a9c5db2af5075 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc @@ -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