Added a console log receiver for ease of use.
This commit is contained in:
parent
c1c14d96ea
commit
f275ff330d
21
ConsoleLogReceiver.cs
Normal file
21
ConsoleLogReceiver.cs
Normal 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}");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user