forked from trent_larson/crowd-funder-for-time-pwa
feat: centralize debug logging with environment control
- Replace stray console.log statements with logger.debug() for controlled output - Add VITE_DEBUG_LOGGING environment variable control for all debug messages - Convert databaseUtil, PlatformServiceFactory, and WebPlatformService to use centralized logger - Wrap Electron console.log statements with environment variable checks - Update SQLWorker to use controlled debug messaging instead of direct console.log - Ensure debug logging is disabled by default for production safety All debug logging now controlled by VITE_DEBUG_LOGGING=true environment variable.
This commit is contained in:
@@ -86,6 +86,7 @@
|
||||
import { Component, Vue } from "vue-facing-decorator";
|
||||
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
|
||||
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
|
||||
import { logger } from "@/utils/logger";
|
||||
|
||||
@Component({
|
||||
mixins: [PlatformServiceMixin],
|
||||
@@ -267,7 +268,7 @@ This tests the complete save → retrieve cycle with actual database interaction
|
||||
this.result = `User #0 settings test completed. isRegistered: ${accountSettings.isRegistered}`;
|
||||
} catch (error) {
|
||||
this.result = `Error testing User #0 settings: ${error}`;
|
||||
console.error("Error testing User #0 settings:", error);
|
||||
logger.error("Error testing User #0 settings:", error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user