Skip to content

Commit

Permalink
Enable no-console rule
Browse files Browse the repository at this point in the history
Logger should be used instead
  • Loading branch information
J12934 committed Oct 11, 2024
1 parent a0064c0 commit bf3a770
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion juice-balancer/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion juice-balancer/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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();
}
}
Expand Down

0 comments on commit bf3a770

Please sign in to comment.