Better logging messages

This commit is contained in:
Chomp 2021-08-20 09:12:26 +01:00
parent 085ff89680
commit 6327711945

View File

@ -28,7 +28,7 @@ namespace Generator
CreateDirIfDoesntExist(_dumpPath); CreateDirIfDoesntExist(_dumpPath);
var botFiles = Directory.GetFiles(_dumpPath, "*.json", SearchOption.TopDirectoryOnly).ToList(); var botFiles = Directory.GetFiles(_dumpPath, "*.json", SearchOption.TopDirectoryOnly).ToList();
Console.WriteLine($"{botFiles.Count} files found"); Console.WriteLine($"{botFiles.Count} bot dump files found");
var parsedBots = new List<Datum>(); var parsedBots = new List<Datum>();
foreach (var file in botFiles) foreach (var file in botFiles)
@ -63,7 +63,7 @@ namespace Generator
} }
stopwatch.Stop(); stopwatch.Stop();
LoggingHelpers.LogToConsole($"Cleaned and Parsed: {parsedBots.Count} Failed: {failedFilesCount}. Took {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds"); LoggingHelpers.LogToConsole($"Cleaned and Parsed: {parsedBots.Count} bots. Failed: {failedFilesCount}. Took {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds");
return parsedBots; return parsedBots;
} }