design-patterns/Facade/Logger.cs

23 lines
491 B
C#
Raw Normal View History

2023-09-04 09:17:26 +00:00
public class Logger : ILogger
{
private readonly BadLogger _logger;
public Logger()
{
_logger = new BadLogger();
}
public void Information(string message)
{
_logger.Log(message, LogType.Info, null);
}
public void Error(string message, Exception? ex = null)
{
_logger.Log(message, LogType.Error, ex);
}
public void Fatal(string message, Exception? ex = null)
{
_logger.Log(message, LogType.Fatal, ex);
}
}