private void Log(SharedObject.enOutputType type, string msg) { Task.Run(async() => { //记录活动日志到服务器 const int limit = 150; if (msg.Length > limit) { msg = msg.Substring(0, limit); } await ViewModelLocator.Instance.Main.ControlServerService.Log(Name, Version, type.ToString(), msg);//有可能有中文,截短点以便数据库字段能存的上 }); }
private void LogToOutputWindow(SharedObject.enOutputType type, string msg, string msgDetails) { Librarys.Logger.Info(string.Format("活动日志:type={0},msg={1},msgDetails={2}", type.ToString(), msg, msgDetails)); }