diff --git a/juice-balancer/eslint.config.js b/juice-balancer/eslint.config.js index 6469c96e0..727e1363d 100644 --- a/juice-balancer/eslint.config.js +++ b/juice-balancer/eslint.config.js @@ -19,7 +19,7 @@ export default [ 'prettier/prettier': 'error', 'linebreak-style': ['error', 'unix'], semi: ['error', 'always'], - 'no-console': 'off', + 'no-console': 'error', }, }, js.configs.recommended, diff --git a/juice-balancer/src/app.js b/juice-balancer/src/app.js index f299c6b69..0e17b26f5 100644 --- a/juice-balancer/src/app.js +++ b/juice-balancer/src/app.js @@ -7,6 +7,7 @@ import basicAuth from 'basic-auth-connect'; import onFinished from 'on-finished'; import { get } from './config.js'; +import { logger } from './logger.js'; import { createTeamsRouteHandler } from './teams/teams.js'; import { createAdminRouteHandler } from './admin/admin.js'; @@ -43,7 +44,7 @@ export function createApp({ kubernetesApi, proxy }) { res.set('Content-Type', register.contentType); res.end(await register.metrics()); } catch (err) { - console.error('Failed to write metrics', err); + logger.warn('Failed to write metrics', err); res.status(500).end(); } }