| | |
| | | // } |
| | | //} |
| | | |
| | | |
| | | /// <summary> |
| | | /// 日志推送 |
| | | /// </summary> |
| | | /// <param name="topic">推送标题</param> |
| | | /// <param name="msg">推送信息</param> |
| | | /// <returns></returns> |
| | | public static async Task PostLogs(string topic, string msg) |
| | | { |
| | | if (client == null) |
| | |
| | | LogTags = new Dictionary<string, string> |
| | | { |
| | | {"tag1", DateTime.Now.ToLongTimeString()}, |
| | | |
| | | }, |
| | | Logs = new List<LogInfo> |
| | | { |
| | |
| | | Time = DateTimeOffset.Now, |
| | | Contents = new Dictionary<string, string> |
| | | { |
| | | {"id", DateTime.Now.Ticks.ToString()}, |
| | | {"homeid", Entity.DB_ResidenceData.Instance.CurrentRegion.id}, |
| | | {"version", MainPage.VersionString}, |
| | | {"userAccount", UserInfo.Current.AccountString}, |
| | | {"userid", UserInfo.Current.ID}, |
| | | {"userAccount", UserInfo.Current.AccountString}, |
| | | {"userName", UserInfo.Current.userName}, |
| | | {"homeid", Entity.DB_ResidenceData.Instance.CurrentRegion.id}, |
| | | {"server", Entity.DB_ResidenceData.Instance.CurrentRegion.regionUrl}, |
| | | {"message", msg}, |
| | | } |
| | | } |