Skip to content

Commit

Permalink
bug(auth): Prevent double log scenario
Browse files Browse the repository at this point in the history
Because:
- Logs were being emitted twice

This Commit:
- Provides a name to the logger instance sent into node-tracing
  • Loading branch information
dschom authored and clouserw committed Sep 30, 2022
1 parent 7c65917 commit 301eb89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fxa-auth-server/bin/key_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const config = require('../config');
const TracingProvider = require('fxa-shared/tracing/node-tracing');
TracingProvider.init(
config.get('tracing'),
require('../lib/log')({ ...config.log })
require('../lib/log')({ ...config.log, name: 'tracing' })
);

const error = require('../lib/error');
Expand Down
1 change: 1 addition & 0 deletions packages/fxa-auth-server/lib/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const CLIENT_ID_TO_SERVICE_NAMES = config.get('oauth.clientIds') || {};
function Lug(options) {
EventEmitter.call(this);
this.name = options.name || 'fxa-auth-server';

this.logger = mozlog({
app: this.name,
level: options.level,
Expand Down

0 comments on commit 301eb89

Please sign in to comment.