feat: 日志优化

This commit is contained in:
zdl
2025-10-18 17:33:15 +08:00
parent a7695c7365
commit 47fcb570c0
10 changed files with 80 additions and 24 deletions

View File

@@ -1,5 +1,6 @@
import React from "react";
import { FormControl, FormErrorMessage, HStack, Input, Button, Spinner } from "@chakra-ui/react";
import { logger } from "../../utils/logger";
/**
* 通用验证码输入组件
@@ -26,7 +27,12 @@ export default function VerificationCodeInput({
}
} catch (error) {
// 错误已经在父组件处理,这里只需要防止未捕获的 Promise rejection
console.error('Send code error (caught in VerificationCodeInput):', error);
logger.error('VerificationCodeInput', 'handleSendCode', error, {
hasOnSendCode: !!onSendCode,
countdown,
isLoading,
isSending
});
}
};