From 06036ed778aec91841dea68e599ee63b4b814de2 Mon Sep 17 00:00:00 2001 From: Andreas Madsen Date: Wed, 31 Jan 2018 17:12:09 +0100 Subject: [PATCH 1/2] trace_events: add file pattern cli option Allow the user to specify the filepath for the trace_events log file using a template string. --- doc/api/cli.md | 9 ++++++ doc/api/tracing.md | 9 ++++++ doc/node.1 | 4 +++ src/node.cc | 17 ++++++++++- src/tracing/agent.cc | 5 ++-- src/tracing/agent.h | 2 +- src/tracing/node_trace_writer.cc | 27 +++++++++++++---- src/tracing/node_trace_writer.h | 4 ++- test/parallel/test-cli-node-options.js | 2 ++ .../test-trace-events-file-pattern.js | 30 +++++++++++++++++++ 10 files changed, 99 insertions(+), 10 deletions(-) create mode 100644 test/parallel/test-trace-events-file-pattern.js diff --git a/doc/api/cli.md b/doc/api/cli.md index 47dcd242a15077..9bc997a98ae64b 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -235,6 +235,14 @@ added: v7.7.0 A comma separated list of categories that should be traced when trace event tracing is enabled using `--trace-events-enabled`. +### `--trace-event-file-pattern` + + +Template string specifying the filepath for the trace event data, it +supports `${rotation}` and `${pid}`. + ### `--zero-fill-buffers`