Log.cs 927 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System;
  2. namespace ETModel
  3. {
  4. public static class Log
  5. {
  6. private static readonly ILog globalLog = new NLogAdapter();
  7. public static void Trace(string message)
  8. {
  9. globalLog.Trace(message);
  10. }
  11. public static void Warning(string message)
  12. {
  13. globalLog.Warning(message);
  14. }
  15. public static void Info(string message)
  16. {
  17. globalLog.Info(message);
  18. }
  19. public static void Debug(string message)
  20. {
  21. globalLog.Debug(message);
  22. }
  23. public static void Error(Exception e)
  24. {
  25. globalLog.Error(e.ToString());
  26. }
  27. public static void Error(string message)
  28. {
  29. globalLog.Error(message);
  30. }
  31. public static void Fatal(Exception e)
  32. {
  33. globalLog.Fatal(e.ToString());
  34. }
  35. public static void Fatal(string message)
  36. {
  37. globalLog.Fatal(message);
  38. }
  39. public static void Msg(object msg)
  40. {
  41. Debug(MongoHelper.ToJson(msg));
  42. }
  43. }
  44. }