日志控制

This commit is contained in:
chen wei bo
2025-09-21 20:36:25 +08:00
parent e78f6b937e
commit 93bfe3174f
23 changed files with 91 additions and 81 deletions
@@ -127,7 +127,7 @@ export class ConfigManager {
ctor: DataCtor<T>
): void {
if (this._config.has(configId)) {
console.warn(
logger.warn(
`[ConfigManager] 重复注册数据ID: ${configId},将覆盖旧构造器`
);
}
@@ -147,7 +147,7 @@ export class ConfigManager {
// 缓存没有→ 查找构造器
const Ctor = this._config.get(configId) as DataCtor<T> | undefined;
if (!Ctor) {
console.warn(`[ConfigManager] 未找到 configId 的构造器配置: ${configId}`);
logger.warn(`[ConfigManager] 未找到 configId 的构造器配置: ${configId}`);
return null;
}