@@ -366,15 +366,16 @@ private static int RunExportCollectCommand(ExportCollectCommandOptions opts)
366366 } ;
367367 serializer . Converters . Add ( new Newtonsoft . Json . Converters . StringEnumConverter ( ) ) ;
368368 Log . Debug ( "{0} RunExportCollectCommand" , Strings . Get ( "End" ) ) ;
369+ string path = Path . Combine ( opts . OutputPath , Helpers . MakeValidFileName ( opts . FirstRunId + "_vs_" + opts . SecondRunId + "_summary.json.txt" ) ) ;
369370
370- using ( StreamWriter sw = new StreamWriter ( Path . Combine ( opts . OutputPath , Helpers . MakeValidFileName ( opts . FirstRunId + "_vs_" + opts . SecondRunId + "_summary.json.txt" ) ) ) ) //lgtm[cs/path-injection]
371+ using ( StreamWriter sw = new StreamWriter ( path ) ) //lgtm[cs/path-injection]
371372 {
372373 using ( JsonWriter writer = new JsonTextWriter ( sw ) )
373374 {
374375 serializer . Serialize ( writer , results ) ;
375376 }
376377 }
377- Log . Information ( Strings . Get ( "DoneWriting" ) ) ;
378+ Log . Information ( Strings . Get ( "OutputWrittenTo" ) , path ) ;
378379 return 0 ;
379380
380381 }
@@ -567,6 +568,7 @@ private static int RunExportMonitorCommand(ExportMonitorCommandOptions opts)
567568 Telemetry . TrackEvent ( "Begin Export Monitor" , StartEvent ) ;
568569
569570 WriteMonitorJson ( opts . RunId , ( int ) RESULT_TYPE . FILE , opts . OutputPath ) ;
571+
570572 return 0 ;
571573 }
572574
@@ -596,13 +598,17 @@ public static void WriteMonitorJson(string RunId, int ResultType, string OutputP
596598 JsonSerializer serializer = JsonSerializer . Create ( settings ) ;
597599 serializer . Converters . Add ( new Newtonsoft . Json . Converters . StringEnumConverter ( ) ) ;
598600
599- using ( StreamWriter sw = new StreamWriter ( Path . Combine ( OutputPath , Helpers . MakeValidFileName ( RunId + "_Monitoring_" + ( ( RESULT_TYPE ) ResultType ) . ToString ( ) + ".json.txt" ) ) ) ) //lgtm[cs/path-injection]
601+ string path = Path . Combine ( OutputPath , Helpers . MakeValidFileName ( RunId + "_Monitoring_" + ( ( RESULT_TYPE ) ResultType ) . ToString ( ) + ".json.txt" ) ) ;
602+
603+ using ( StreamWriter sw = new StreamWriter ( path ) ) //lgtm[cs/path-injection]
600604 {
601605 using ( JsonWriter writer = new JsonTextWriter ( sw ) )
602606 {
603607 serializer . Serialize ( writer , records ) ;
604608 }
605609 }
610+ Log . Information ( Strings . Get ( "OutputWrittenTo" ) , path ) ;
611+
606612 }
607613
608614 private static int RunMonitorCommand ( MonitorCommandOptions opts )
@@ -1314,6 +1320,7 @@ private static int RunCompareCommand(CompareCommandOptions opts)
13141320
13151321 var result = engine . CompileRenderAsync ( "Output" + Path . DirectorySeparatorChar + "Output.cshtml" , results ) . Result ;
13161322 File . WriteAllText ( $ "{ opts . OutputBaseFilename } .html", result ) ;
1323+ Log . Information ( Strings . Get ( "OutputWrittenTo" ) , opts . OutputBaseFilename + ".html" ) ;
13171324
13181325 return 0 ;
13191326 }
0 commit comments