LoggerImpl.cs 824 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace NetCore31BACNetTransfor
  5. {
  6. public class LoggerImpl : ILogger
  7. {
  8. private static LoggerImpl instance;
  9. public static LoggerImpl Instance()
  10. {
  11. if (LoggerImpl.instance == null)
  12. {
  13. LoggerImpl.instance = new LoggerImpl();
  14. }
  15. return LoggerImpl.instance;
  16. }
  17. private LoggerImpl()
  18. {
  19. }
  20. public void Debug(string message)
  21. {
  22. Console.WriteLine("Debug\t" + message);
  23. }
  24. public void Info(string message)
  25. {
  26. Console.WriteLine("Info\t" + message);
  27. }
  28. public void Warn(string message)
  29. {
  30. Console.WriteLine("Warn\t" + message);
  31. }
  32. public void Error(string message)
  33. {
  34. Console.WriteLine("Error\t" + message);
  35. }
  36. public void Fatal(string message)
  37. {
  38. Console.WriteLine("Fatal\t" + message);
  39. }
  40. }
  41. }