Code cleanup

This commit is contained in:
Bryan Ashby 2018-06-13 20:58:59 -06:00
parent 7748765ce0
commit ceab8a0180
1 changed files with 2 additions and 2 deletions

View File

@ -26,12 +26,12 @@ module.exports = class Log {
} }
const serializers = { const serializers = {
err : bunyan.stdSerializers.err, // handle 'err' fields with stack/etc. err : bunyan.stdSerializers.err, // handle 'err' fields with stack/etc.
}; };
// try to remove sensitive info by default, e.g. 'password' fields // try to remove sensitive info by default, e.g. 'password' fields
[ 'formData', 'formValue' ].forEach(keyName => { [ 'formData', 'formValue' ].forEach(keyName => {
serializers[keyName] = (fd) => Log.hideSensitive(fd); serializers[keyName] = (fd) => Log.hideSensitive(fd);
}); });
this.log = bunyan.createLogger({ this.log = bunyan.createLogger({