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,6 +3,9 @@
|
||||
* Manages the code quality dashboard page
|
||||
*/
|
||||
|
||||
// ✅ Use centralized logger
|
||||
const codeQualityLog = window.LogConfig.createLogger('CODE-QUALITY');
|
||||
|
||||
function codeQualityDashboard() {
|
||||
return {
|
||||
// Extend base data
|
||||
@@ -45,7 +48,7 @@ function codeQualityDashboard() {
|
||||
const stats = await apiClient.get('/admin/code-quality/stats');
|
||||
this.stats = stats;
|
||||
} catch (err) {
|
||||
console.error('Failed to load stats:', err);
|
||||
codeQualityLog.error('Failed to load stats:', err);
|
||||
this.error = err.message;
|
||||
|
||||
// Redirect to login if unauthorized
|
||||
@@ -74,7 +77,7 @@ function codeQualityDashboard() {
|
||||
this.successMessage = null;
|
||||
}, 5000);
|
||||
} catch (err) {
|
||||
console.error('Failed to run scan:', err);
|
||||
codeQualityLog.error('Failed to run scan:', err);
|
||||
this.error = err.message;
|
||||
|
||||
// Redirect to login if unauthorized
|
||||
|
||||
Reference in New Issue
Block a user