2021-08-12 16:52:06 +01:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Generator.Helpers
|
|
|
|
|
{
|
|
|
|
|
public static class LoggingHelpers
|
|
|
|
|
{
|
|
|
|
|
internal static string LogTimeTaken(double totalSeconds)
|
|
|
|
|
{
|
|
|
|
|
return Math.Round(totalSeconds, 2, MidpointRounding.ToEven).ToString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void LogToConsole(string message)
|
|
|
|
|
{
|
2021-08-13 16:21:20 +01:00
|
|
|
|
Console.BackgroundColor = ConsoleColor.Green;
|
|
|
|
|
Console.ForegroundColor = ConsoleColor.Black;
|
|
|
|
|
|
2021-08-12 16:52:06 +01:00
|
|
|
|
Console.WriteLine(message);
|
2021-08-13 16:21:20 +01:00
|
|
|
|
|
|
|
|
|
ResetConsoleColours();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static void ResetConsoleColours()
|
|
|
|
|
{
|
|
|
|
|
Console.BackgroundColor = ConsoleColor.Black;
|
|
|
|
|
Console.ForegroundColor = ConsoleColor.White;
|
2021-08-12 16:52:06 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|