src: print MKSNAPSHOT debug logs to stderr
PR-URL: https://github.com/nodejs/node/pull/50759 Refs: https://github.com/nodejs/node/issues/50740 Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
parent
ef5c8e4593
commit
973f30b16f
@ -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";
|
||||
});
|
||||
|
||||
|
@ -1075,7 +1075,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user