style(logging): 调整日志级别从错误到信息
- 将 QuotaMonitorService 中的空值检查日志从 Error 级别改为 Info 级别 - 将 SwapEodPositionService 中的参数验证日志从 Error 级别改为 Info 级别 - 保持原有的异常抛出逻辑不变,仅修改日志输出级别 - 统一参数验证相关的日志记录方式
This commit is contained in:
@@ -4952,13 +4952,13 @@ namespace YLErp.Modules.RiskModule
|
||||
var item = positions[i];
|
||||
if (item == null)
|
||||
{
|
||||
_logger.Error($"[CheckUnderlyingWhiteList] 错误: positions[{i}] 为 null");
|
||||
_logger.Info($"[CheckUnderlyingWhiteList] positions[{i}] 为 null");
|
||||
quotaMsg = "持仓数据异常:存在空记录";
|
||||
return false;
|
||||
}
|
||||
if (string.IsNullOrEmpty(item.UnderlyingCode))
|
||||
{
|
||||
_logger.Error($"[CheckUnderlyingWhiteList] 错误: positions[{i}].UnderlyingCode 为 null 或空 - id: {item.id}, SwapTradeId: {item.SwapTradeId}");
|
||||
_logger.Info($"[CheckUnderlyingWhiteList] positions[{i}].UnderlyingCode 为 null 或空 - id: {item.id}, SwapTradeId: {item.SwapTradeId}");
|
||||
quotaMsg = "持仓数据异常:标的代码为空";
|
||||
return false;
|
||||
}
|
||||
@@ -5073,7 +5073,7 @@ namespace YLErp.Modules.RiskModule
|
||||
|
||||
if (trades == null || trades.Count == 0)
|
||||
{
|
||||
_logger.Error("[CheckFund] 错误: trades 为 null 或空列表");
|
||||
_logger.Info("[CheckFund] trades 为 null 或空列表");
|
||||
msg = "交易列表为空";
|
||||
return false;
|
||||
}
|
||||
@@ -5139,7 +5139,7 @@ namespace YLErp.Modules.RiskModule
|
||||
// 检查 ExerciseDate 是否为 null
|
||||
if (!trades[0].ExerciseDate.HasValue)
|
||||
{
|
||||
_logger.Error($"[CheckFund] 错误: trades[0].ExerciseDate 为 null - tradeId: {trades[0].id}");
|
||||
_logger.Info($"[CheckFund] trades[0].ExerciseDate 为 null - tradeId: {trades[0].id}");
|
||||
msg = "交易行权日期不能为空";
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user