mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-04-05 00:37:21 +08:00
feat: Token 支持请求日志开关并记录 OpenAPI 请求日志
新增 Token 的 IsEnableLog 字段,贯穿领域、应用与 DTO;在 OpenApiService 中根据 Token 配置异步记录请求日志,包含请求体、模型与接口类型,用于后续审计与分析。
This commit is contained in:
@@ -83,6 +83,7 @@ public class TokenService : ApplicationService
|
||||
PremiumQuotaLimit = t.PremiumQuotaLimit,
|
||||
PremiumUsedQuota = usedQuota,
|
||||
IsDisabled = t.IsDisabled,
|
||||
IsEnableLog = t.IsEnableLog,
|
||||
CreationTime = t.CreationTime
|
||||
};
|
||||
}).ToList();
|
||||
@@ -158,6 +159,7 @@ public class TokenService : ApplicationService
|
||||
PremiumQuotaLimit = token.PremiumQuotaLimit,
|
||||
PremiumUsedQuota = 0,
|
||||
IsDisabled = token.IsDisabled,
|
||||
IsEnableLog = token.IsEnableLog,
|
||||
CreationTime = token.CreationTime
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user