FLogger.cs 1004 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* ==============================================================================
  2. * 功能描述:FLogger
  3. * 创 建 者:Garrett
  4. * 创建日期:2019/8/2 16:07:06
  5. * ==============================================================================*/
  6. using System;
  7. using System.Collections.Generic;
  8. using System.IO;
  9. using System.Linq;
  10. using System.Net.Mime;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. namespace ExportStart
  14. {
  15. /// <summary>
  16. /// FLogger
  17. /// </summary>
  18. class FLogger
  19. {
  20. private string m_LoggerPath = @"D:\log.txt";
  21. private FLogger()
  22. { }
  23. private static FLogger m_Instance = null;
  24. public static FLogger Instance
  25. {
  26. get
  27. {
  28. if(m_Instance==null)
  29. m_Instance=new FLogger();
  30. return m_Instance;
  31. }
  32. }
  33. public void Debug(string str)
  34. {
  35. File.AppendAllText(m_LoggerPath,str+"\r\n");
  36. }
  37. }
  38. }