LogUtil.cs 742 B

1234567891011121314151617181920212223242526272829303132
  1. using Serilog;
  2. namespace Team.Utility
  3. {
  4. public static class LogUtil
  5. {
  6. /// <summary>
  7. /// INfo
  8. /// </summary>
  9. /// <param name="msg"></param>
  10. public static void WriteInfo(object msg)
  11. {
  12. Log.Logger.Information(msg.ToString());
  13. }
  14. /// <summary>
  15. /// 异常
  16. /// </summary>
  17. /// <param name="msg"></param>
  18. public static void WriteError(object msg)
  19. {
  20. Log.Logger.Error(msg.ToString());
  21. }
  22. /// <summary>
  23. /// Debug
  24. /// </summary>
  25. /// <param name="msg"></param>
  26. public static void WriteDebug(object msg)
  27. {
  28. Log.Debug(msg.ToString());
  29. }
  30. }
  31. }