[Tools] Explicitly log new format file creation (#4918)
authorMitchell Hwang <16830051+mdh1418@users.noreply.github.com>
Mon, 9 Sep 2024 23:48:30 +0000 (19:48 -0400)
committerGitHub <noreply@github.com>
Mon, 9 Sep 2024 23:48:30 +0000 (16:48 -0700)
Fixes https://github.com/dotnet/diagnostics/issues/4908

src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs
src/Tools/dotnet-trace/CommandLine/Options/CommonOptions.cs
src/Tools/dotnet-trace/TraceFileFormatConverter.cs

index 97007d3d1ee6b48fae93644368562328d617666e..f1f40b384bb4cb1f86cd0be651c0bcc09b400f05 100644 (file)
@@ -45,7 +45,7 @@ namespace Microsoft.Diagnostics.Tools.Trace
         /// <param name="buffersize">Sets the size of the in-memory circular buffer in megabytes.</param>
         /// <param name="providers">A list of EventPipe providers to be enabled. This is in the form 'Provider[,Provider]', where Provider is in the form: 'KnownProviderName[:Flags[:Level][:KeyValueArgs]]', and KeyValueArgs is in the form: '[key1=value1][;key2=value2]'</param>
         /// <param name="profile">A named pre-defined set of provider configurations that allows common tracing scenarios to be specified succinctly.</param>
-        /// <param name="format">The desired format of the created trace file.</param>
+        /// <param name="format">If not using the default NetTrace format, an additional file will be emitted with the specified format under the same output name and with the corresponding format extension.</param>
         /// <param name="duration">The duration of trace to be taken. </param>
         /// <param name="clrevents">A list of CLR events to be emitted.</param>
         /// <param name="clreventlevel">The verbosity level of CLR events</param>
index 0500292d6da2464c9c0ce0298f91695ad5e23d1b..a5e9fd7ad25cd8a0d920139de25bc4bd6e3f9f52 100644 (file)
@@ -28,7 +28,7 @@ namespace Microsoft.Diagnostics.Tools.Trace
         public static Option FormatOption() =>
             new(
                 alias: "--format",
-                description: $"Sets the output format for the trace file.  Default is {DefaultTraceFileFormat()}.")
+                description: $"If not using the default NetTrace format, an additional file will be emitted with the specified format under the same output name and with the corresponding format extension. The default format is {DefaultTraceFileFormat()}.")
             {
                 Argument = new Argument<TraceFileFormat>(name: "trace-file-format", getDefaultValue: DefaultTraceFileFormat)
             };
index f383a7453d691f96eb8c7b386ac96f77228f31c7..b954cf052450e0170afb92c3993ba8d4315ea79b 100644 (file)
@@ -36,14 +36,13 @@ namespace Microsoft.Diagnostics.Tools.Trace
 
         internal static void ConvertToFormat(IConsole console, TraceFileFormat format, string fileToConvert, string outputFilename)
         {
-            console.Out.WriteLine($"Writing:\t{outputFilename}");
-
             switch (format)
             {
                 case TraceFileFormat.NetTrace:
                     break;
                 case TraceFileFormat.Speedscope:
                 case TraceFileFormat.Chromium:
+                    console.Out.WriteLine($"Processing trace data file '{fileToConvert}' to create a new {format} file '{outputFilename}'.");
                     try
                     {
                         Convert(console, format, fileToConvert, outputFilename);