LogHelper.cs 579 B

1234567891011121314151617181920212223
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Threading;
  5. using Library;
  6. using LitJson;
  7. using MySystem;
  8. public class LogHelper
  9. {
  10. public readonly static LogHelper Instance = new LogHelper();
  11. private LogHelper()
  12. { }
  13. public void WriteLog(string Content, string Topic)
  14. {
  15. Dictionary<string, string> dic = new Dictionary<string, string>();
  16. dic.Add("Topic", Topic);
  17. dic.Add("Content", Content);
  18. RedisDbconn.Instance.AddList("SlsLogQueue", Newtonsoft.Json.JsonConvert.SerializeObject(dic));
  19. }
  20. }