/// <summary> /// 创建运行日志信息 /// </summary> /// <param name="runtimeLogModel">运行日志</param> /// <returns>运行日志信息</returns> public async Task <RuntimeLogInfo> CreateAsync(RuntimeLogModel runtimeLogModel) { runtimeLogModel.NotNull("运行日志不能为空"); var runtimeLogInfo = new RuntimeLogInfo { FCallMemberName = runtimeLogModel.FCallMemberName, FContent = runtimeLogModel.FContent, FCreateTime = DateTimeUtil.Now, FExecuteTime = runtimeLogModel.FExecuteTime, FIsDeleted = false, FLogLevel = runtimeLogModel.FLogLevel, FProjectName = runtimeLogModel.FProjectName, FServicerMac = runtimeLogModel.FServerMac, FSource = runtimeLogModel.FSource, FRequestGuid = runtimeLogModel.FRequestGuid }; if (runtimeLogInfo.FProjectName.IsNotNullAndNotEmptyWhiteSpace()) { runtimeLogInfo.FProjectID = await _projectDomainService.GetProjectIDAsync(runtimeLogInfo.FProjectName); } if (runtimeLogInfo.FServicerMac.IsNotNullAndNotEmptyWhiteSpace()) { runtimeLogInfo.FServicerID = await _servicerDomainService.GetServerIDAsync(runtimeLogInfo.FServicerMac); } return(runtimeLogInfo); }