fix(js): replace console.log with centralized logger (JS-002)
Convert direct console.log/error/warn calls to use centralized logger: - imports.js: 13 violations fixed using adminImportsLog - vendor-themes.js: 5 violations fixed using vendorThemesLog - code-quality-dashboard.js: 2 violations fixed using codeQualityLog - code-quality-violations.js: 1 violation fixed using codeQualityViolationsLog - settings.js: 1 violation fixed using settingsLog All files now use window.LogConfig.loggers.* for consistent logging. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -3,10 +3,13 @@
|
||||
* Admin vendor themes selection page
|
||||
*/
|
||||
|
||||
console.log('[ADMIN VENDOR THEMES] Loading...');
|
||||
// ✅ Use centralized logger
|
||||
const vendorThemesLog = window.LogConfig.loggers.vendorTheme;
|
||||
|
||||
vendorThemesLog.info('Loading...');
|
||||
|
||||
function adminVendorThemes() {
|
||||
console.log('[ADMIN VENDOR THEMES] adminVendorThemes() called');
|
||||
vendorThemesLog.debug('adminVendorThemes() called');
|
||||
|
||||
return {
|
||||
// Inherit base layout state
|
||||
@@ -44,9 +47,9 @@ function adminVendorThemes() {
|
||||
try {
|
||||
const response = await apiClient.get('/admin/vendors?limit=1000');
|
||||
this.vendors = response.vendors || [];
|
||||
console.log('[ADMIN VENDOR THEMES] Loaded vendors:', this.vendors.length);
|
||||
vendorThemesLog.debug('Loaded vendors:', this.vendors.length);
|
||||
} catch (error) {
|
||||
console.error('[ADMIN VENDOR THEMES] Failed to load vendors:', error);
|
||||
vendorThemesLog.error('Failed to load vendors:', error);
|
||||
this.error = error.message || 'Failed to load vendors';
|
||||
} finally {
|
||||
this.loading = false;
|
||||
@@ -62,4 +65,4 @@ function adminVendorThemes() {
|
||||
};
|
||||
}
|
||||
|
||||
console.log('[ADMIN VENDOR THEMES] Module loaded');
|
||||
vendorThemesLog.info('Module loaded');
|
||||
|
||||
Reference in New Issue
Block a user