| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 77cb604 commit 0805068
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -80,6 +80,17 @@ string that supports `${rotation}` and `${pid}`: | |||
| 80 | 80 | node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js | |
| 81 | 81 | ``` | |
| 82 | 82 | ||
| 83 | + To guarantee that the log file is properly generated after signal events like | ||
| 84 | + `SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers | ||
| 85 | + in your code, such as: | ||
| 86 | + | ||
| 87 | + ```js | ||
| 88 | + process.on('SIGINT', function onSigint() { | ||
| 89 | + console.info('Received SIGINT.'); | ||
| 90 | + process.exit(130); // Or applicable exit code depending on OS and signal | ||
| 91 | + }); | ||
| 92 | + ``` | ||
| 93 | + | ||
| 83 | 94 | The tracing system uses the same time source | |
| 84 | 95 | as the one used by `process.hrtime()`. | |
| 85 | 96 | However the trace-event timestamps are expressed in microseconds, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments