CSLogger.cs 749 B

123456789101112131415161718192021222324252627
  1. using System;
  2. namespace IFramework
  3. {
  4. class CSLogger : ILoger
  5. {
  6. public void Error(object messages, params object[] paras)
  7. {
  8. Console.WriteLine(string.Format("[Err] {0}:\t{1}", DateTime.Now.ToString(), messages), paras);
  9. }
  10. public void Exception(Exception ex)
  11. {
  12. throw ex;
  13. }
  14. public void Log(object messages, params object[] paras)
  15. {
  16. Console.WriteLine(string.Format("[Log] {0}:\t{1}", DateTime.Now.ToString(), messages), paras);
  17. }
  18. public void Warn(object messages, params object[] paras)
  19. {
  20. Console.WriteLine(string.Format("[Warn] {0}:\t{1}", DateTime.Now.ToString(), messages), paras);
  21. }
  22. }
  23. }