refactor(logging): centralize console output

This commit is contained in:
2026-06-18 13:34:19 +08:00
parent f600e11d55
commit 812a3e41b9
24 changed files with 261 additions and 166 deletions
@@ -18,6 +18,9 @@ import { ROUTES } from "@/router/routes";
import { SubscriptionCtaButton } from "./subscription-cta-button";
import styles from "./subscription-cta-button.module.css";
import { Logger } from "@/utils";
const log = new Logger("AppSubscriptionComponentsSubscriptionCheckoutButton");
export interface SubscriptionCheckoutButtonProps {
planId: SubscriptionPlanId;
@@ -64,7 +67,7 @@ export function SubscriptionCheckoutButton({
window.location.href = url;
} catch (e) {
const err = e as Error;
console.error("[subscription-checkout-button] error", err);
log.error("[subscription-checkout-button] error", err);
setError(err.message);
setIsLoading(false);
}