user2572969
user2572969

Reputation: 267

any body provide me node.js gc log file

Can any body tell me how to redirect output trace_gc to log file in node js instead of console I gave command like this

node -trace_gc -trace_gc_verbose example.js

and also give me one example gc log file for node.js

Upvotes: 2

Views: 1937

Answers (1)

Thibault Poncelet
Thibault Poncelet

Reputation: 103

If you do not need to separate the output of the application itself from the gc trace you can simply redirect the output using:

node -trace_gc -trace_gc_verbose example.js > output.log

Otherwise V8 has a --log_gc option which output to the log file (can be defined with --logfile but this does not seems to output has many information as -trace_gc.

See node --v8-options for all options

Upvotes: 3

Related Questions