Added a console log receiver for ease of use.

This commit is contained in:
Harrison Deng 2021-04-23 15:13:26 -05:00
parent c1c14d96ea
commit f275ff330d

21
ConsoleLogReceiver.cs Normal file
View File

@ -0,0 +1,21 @@
using System;
using SimpleLogger;
namespace SimpleLogger
{
public class ConsoleLogReceiver : ILogReceiver
{
public string Identifier => "Console Logger";
public LogLevel Level => LogLevel.DEBUG;
public void Flush()
{
}
public void LogMessage(string message, DateTime time, LogLevel level)
{
Console.WriteLine($"[{time.ToShortTimeString()}] [{level}]: {message}");
}
}
}