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:
@@ -1,3 +1,7 @@
|
||||
import Logger from '@/utils/Logger';
|
||||
|
||||
const logger = Logger.withTag('M3U');
|
||||
|
||||
export interface Channel {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -59,7 +63,7 @@ export const fetchAndParseM3u = async (m3uUrl: string): Promise<Channel[]> => {
|
||||
const m3uText = await response.text();
|
||||
return parseM3U(m3uText);
|
||||
} catch (error) {
|
||||
console.info("Error fetching or parsing M3U:", error);
|
||||
logger.info("Error fetching or parsing M3U:", error);
|
||||
return []; // Return empty array on error
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user