# nodejsGCLogPath
This is an argument that points the yc-360 script at the file containing your Node.js application's garbage collection trace output, so it can extract GC log data from it.
Type: string
Default: none. On Linux and macOS the script attempts to discover the application's output on its own. On Windows this argument is required.
Usage:
- Linux and macOS: optional. The script auto discovers the target process's standard output and reads GC lines from it directly. Pass this argument only if auto discovery doesn't work in your environment.
- Windows: required. There's no OS level way for the yc-360 script to discover where another process's output is being written, so you must redirect it to a file yourself and point the script at that file.
How it works:
- Your Node.js application must be started with
--trace-gc. Node.js always writes GC trace lines to standard output; there's no flag that sends them to a separate file directly. - Redirect your application's standard output to a file at startup.
- Pass that file's path as
nodejsGCLogPathwhen running the yc-360 script. The script reads GC trace lines out of it, ignoring any other application output mixed in.
See Configuring Continuous GC Log Capture for the full explanation of why this workaround is necessary.
Example command to run the continuous GC Log Capture
node --trace-gc app.js > app-output.log 2>&1
1
Example (YAML):
options:
onlyCapture: true
appRuntime: nodejs
nodejsGCLogPath:
- /path/to/app-output.log
1
2
3
4
5
2
3
4
5
Example (CLI):
./yc -onlyCapture -p 22534 -appRuntime=nodejs -nodejsGCLogPath=/path/to/app-output.log
1