design-patterns/Facade/BadLogger.cs

14 lines
410 B
C#
Raw Normal View History

2023-09-07 12:41:04 +00:00
public class BadLogger : IBadLogger
2023-09-04 09:17:26 +00:00
{
2023-09-05 09:40:56 +00:00
public void Log(string message, LogType logType, LogTarget target, Exception? ex)
2023-09-04 09:17:26 +00:00
{
Console.WriteLine($"{DateTime.UtcNow:s} [{logType.ToString().ToUpper()}] {message}");
if (ex != null)
{
Console.WriteLine("Exception:");
Console.WriteLine(ex.Message);
Console.WriteLine(ex.StackTrace);
}
}
}