Code cleanup
This commit is contained in:
parent
7748765ce0
commit
ceab8a0180
|
@ -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({
|
||||||
|
|
Loading…
Reference in New Issue