Skip to content

Commit ebd1db4

Browse files
authored
[backport] Fix rundown default (#5423)
2 parents 218c2d1 + 33794b6 commit ebd1db4

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Diff for: src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs

+5-7
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,10 @@ private static async Task<int> Collect(CancellationToken ct, CommandLineConfigur
377377
stoppingEventProviderName,
378378
stoppingEventEventName,
379379
payloadFilter,
380-
onEvent: (traceEvent) =>
381-
{
380+
onEvent: (traceEvent) => {
382381
shouldExit.Set();
383382
},
384-
onPayloadFilterMismatch: (traceEvent) =>
385-
{
383+
onPayloadFilterMismatch: (traceEvent) => {
386384
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.");
387385
},
388386
eventStream: new PassthroughStream(session.EventStream, fs, (int)buffersize, leaveDestinationStreamOpen: true),
@@ -620,7 +618,7 @@ public static Command CollectCommand()
620618
private static readonly Option<FileInfo> OutputPathOption =
621619
new("--output", "-o")
622620
{
623-
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'.",
621+
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'.",
624622
DefaultValueFactory = _ => new FileInfo(DefaultTraceName)
625623
};
626624

@@ -699,10 +697,10 @@ public static Command CollectCommand()
699697
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."
700698
};
701699

702-
private static readonly Option<bool> RundownOption =
700+
private static readonly Option<bool?> RundownOption =
703701
new("--rundown")
704702
{
705-
Description = @"Collect rundown events unless specified false."
703+
Description = @"Collect rundown events unless specified false."
706704
};
707705

708706
private static readonly Option<string> DSRouterOption =

0 commit comments

Comments
 (0)