forked from jsnbuchanan/crowd-funder-for-time-pwa
Replace console statements with structured logger calls
- Replace 30 console.log/error/warn statements with appropriate logger calls - Add logger imports where missing (PlatformServiceFactory, PlatformServiceMixin) - Maintain eslint-disable comments for critical error logging in worker context - Improve error handling consistency across platform services - Clean up commented-out logger statements in WebPlatformService Files affected: - src/db/databaseUtil.ts: 4 console statements → logger calls - src/main.electron.ts: 3 console statements → logger calls - src/registerSQLWorker.js: 9 console statements → logger calls - src/services/PlatformServiceFactory.ts: 1 console statement → logger call - src/services/platforms/WebPlatformService.ts: 8 console statements → logger calls - src/utils/PlatformServiceMixin.ts: 5 console statements → logger calls Reduces ESLint warnings from 111 to 82 (eliminates all no-console warnings)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { PlatformService } from "./PlatformService";
|
||||
import { WebPlatformService } from "./platforms/WebPlatformService";
|
||||
import { CapacitorPlatformService } from "./platforms/CapacitorPlatformService";
|
||||
import { logger } from "../utils/logger";
|
||||
|
||||
/**
|
||||
* Factory class for creating platform-specific service implementations.
|
||||
@@ -41,7 +42,7 @@ export class PlatformServiceFactory {
|
||||
const platform = process.env.VITE_PLATFORM || "web";
|
||||
|
||||
if (!PlatformServiceFactory.creationLogged) {
|
||||
console.log(
|
||||
logger.log(
|
||||
`[PlatformServiceFactory] Creating singleton instance for platform: ${platform}`,
|
||||
);
|
||||
PlatformServiceFactory.creationLogged = true;
|
||||
|
||||
Reference in New Issue
Block a user