|
@@ -14,10 +14,17 @@ public class LogHelper
|
|
|
|
|
|
public void WriteLog(string Content, string Topic)
|
|
public void WriteLog(string Content, string Topic)
|
|
{
|
|
{
|
|
- Dictionary<string, string> dic = new Dictionary<string, string>();
|
|
|
|
- dic.Add("Topic", Topic);
|
|
|
|
- dic.Add("Content", Content);
|
|
|
|
- RedisDbconn.Instance.AddList("SlsLogQueue", Newtonsoft.Json.JsonConvert.SerializeObject(dic));
|
|
|
|
|
|
+ if(Library.ConfigurationManager.EnvironmentFlag == 2)
|
|
|
|
+ {
|
|
|
|
+ Dictionary<string, string> dic = new Dictionary<string, string>();
|
|
|
|
+ dic.Add("Topic", Topic);
|
|
|
|
+ dic.Add("Content", Content);
|
|
|
|
+ RedisDbconn.Instance.AddList("SlsLogQueue", Newtonsoft.Json.JsonConvert.SerializeObject(dic));
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ function.WriteLog(Content, Topic);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|