123456789101112131415161718192021222324252627282930 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Threading;
- using Library;
- using LitJson;
- using MySystem;
- public class LogHelper
- {
- public readonly static LogHelper Instance = new LogHelper();
- private LogHelper()
- { }
- public void WriteLog(string Content, string FileName, bool sls = false)
- {
- if(sls)
- {
- Dictionary<string, string> dic = new Dictionary<string, string>();
- dic.Add("Topic", FileName);
- dic.Add("Content", Content);
- KxsRedisDbconn.Instance.AddList("SlsLogQueue", Newtonsoft.Json.JsonConvert.SerializeObject(dic));
- }
- else
- {
- function.WriteLog(Content, FileName);
- }
- }
- }
|