21 lines
474 B
C#
21 lines
474 B
C#
using System;
|
|
using SimpleLogger;
|
|
|
|
namespace SimpleLogger
|
|
{
|
|
public class ConsoleLogReceiver : ILogReceiver
|
|
{
|
|
public string Identifier => "Console Logger";
|
|
|
|
public LogLevel Level { get; set; } = LogLevel.Debug;
|
|
|
|
public void Flush()
|
|
{
|
|
}
|
|
|
|
public void LogMessage(string message, DateTime time, LogLevel level)
|
|
{
|
|
Console.WriteLine($"[{time.ToShortTimeString()}] [{level}]: {message}");
|
|
}
|
|
}
|
|
} |