move logging around in json writer class

This commit is contained in:
Chomp 2022-01-04 16:10:13 +00:00
parent 340cd0705e
commit f02e014434

View File

@ -14,8 +14,6 @@ namespace QuestValidator.Common
var outputPath = $"{workingPath}\\output\\{outputFolderName}"; var outputPath = $"{workingPath}\\output\\{outputFolderName}";
DiskHelpers.CreateDirIfDoesntExist(outputPath); DiskHelpers.CreateDirIfDoesntExist(outputPath);
Console.WriteLine($"Writing json file to {outputPath}");
var options = new JsonSerializerOptions var options = new JsonSerializerOptions
{ {
WriteIndented = true, WriteIndented = true,
@ -25,6 +23,9 @@ namespace QuestValidator.Common
}; };
var json = JsonSerializer.Serialize(itemToSerialise, options); var json = JsonSerializer.Serialize(itemToSerialise, options);
File.WriteAllText($"{outputPath}\\{fileName}.json", json); File.WriteAllText($"{outputPath}\\{fileName}.json", json);
Console.WriteLine($"wrote {fileName}.json file to {outputPath}");
} }
} }
} }