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:
2025-12-03 21:31:48 +01:00
parent 96bdb07fb2
commit dd0ba1ed5e
5 changed files with 31 additions and 22 deletions

View File

@@ -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');