Tranga-Website/Logging/FormattedConsoleLogger.cs

17 lines
397 B
C#
Raw Normal View History

2023-05-20 21:47:54 +02:00
using System.Text;
namespace Logging;
public class FormattedConsoleLogger : LoggerBase
{
private readonly TextWriter _stdOut;
public FormattedConsoleLogger(TextWriter stdOut, Encoding? encoding = null) : base(encoding)
2023-05-20 21:47:54 +02:00
{
this._stdOut = stdOut;
2023-05-20 21:47:54 +02:00
}
protected override void Write(LogMessage message)
{
this._stdOut.Write(message.formattedMessage);
2023-05-20 21:47:54 +02:00
}
}