Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,10 @@ private static async Task<int> Collect(CancellationToken ct, CommandLineConfigur
stoppingEventProviderName,
stoppingEventEventName,
payloadFilter,
onEvent: (traceEvent) =>
{
onEvent: (traceEvent) => {
shouldExit.Set();
},
onPayloadFilterMismatch: (traceEvent) =>
{
onPayloadFilterMismatch: (traceEvent) => {
ConsoleWriteLine($"One or more field names specified in the payload filter for event '{traceEvent.ProviderName}/{traceEvent.EventName}' do not match any of the known field names: '{string.Join(' ', traceEvent.PayloadNames)}'. As a result the requested stopping event is unreachable; will continue to collect the trace for the remaining specified duration.");
},
eventStream: new PassthroughStream(session.EventStream, fs, (int)buffersize, leaveDestinationStreamOpen: true),
Expand Down Expand Up @@ -620,7 +618,7 @@ public static Command CollectCommand()
private static readonly Option<FileInfo> OutputPathOption =
new("--output", "-o")
{
Description = $"The output path for the collected trace data. If not specified it defaults to '<appname>_<yyyyMMdd>_<HHmmss>.nettrace', e.g., 'myapp_20210315_111514.nettrace'.",
Description = $"The output path for the collected trace data. If not specified it defaults to '<appname>_<yyyyMMdd>_<HHmmss>.nettrace', e.g., 'myapp_20210315_111514.nettrace'.",
DefaultValueFactory = _ => new FileInfo(DefaultTraceName)
};

Expand Down Expand Up @@ -699,10 +697,10 @@ public static Command CollectCommand()
Description = @"A string, parsed as [payload_field_name]:[payload_field_value] pairs separated by commas, that will stop the trace upon hitting an event with a matching payload. Requires `--stopping-event-provider-name` and `--stopping-event-event-name` to be set."
};

private static readonly Option<bool> RundownOption =
private static readonly Option<bool?> RundownOption =
new("--rundown")
{
Description = @"Collect rundown events unless specified false."
Description = @"Collect rundown events unless specified false."
};

private static readonly Option<string> DSRouterOption =
Expand Down