mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-02-04 03:36:29 +08:00
refactor(logging): implement unified Logger system to replace console calls
- Add Logger utility with tagged output and environment-based control - Configure Babel to remove console calls in production builds - Replace all console.* calls across stores, services, and components with Logger - Enable development-only logging with formatted output and component tags - Optimize production builds by eliminating all logging code
This commit is contained in:
@@ -15,6 +15,9 @@ import { useUpdateStore, initUpdateStore } from "@/stores/updateStore";
|
||||
import { UpdateModal } from "@/components/UpdateModal";
|
||||
import { UPDATE_CONFIG } from "@/constants/UpdateConfig";
|
||||
import { useResponsiveLayout } from "@/hooks/useResponsiveLayout";
|
||||
import Logger from '@/utils/Logger';
|
||||
|
||||
const logger = Logger.withTag('RootLayout');
|
||||
|
||||
// Prevent the splash screen from auto-hiding before asset loading is complete.
|
||||
SplashScreen.preventAutoHideAsync();
|
||||
@@ -48,7 +51,7 @@ export default function RootLayout() {
|
||||
if (loaded || error) {
|
||||
SplashScreen.hideAsync();
|
||||
if (error) {
|
||||
console.warn(`Error in loading fonts: ${error}`);
|
||||
logger.warn(`Error in loading fonts: ${error}`);
|
||||
}
|
||||
}
|
||||
}, [loaded, error]);
|
||||
|
||||
Reference in New Issue
Block a user