Skip to content

Commit 5c5e0bc

Browse files
authored
Fix logs (#37)
Don't log user's sensitive data
1 parent f9ed225 commit 5c5e0bc

File tree

5 files changed

+1144
-1520
lines changed

5 files changed

+1144
-1520
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.2.3 (Sept 11, 2020)
2+
* Bump dependencies
3+
* Don't log entire incoming message at info level
4+
15
## 1.2.2 (May 19, 2020)
26

37
* Update sailor version to 2.6.7

lib/helper/request.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ function buildRequestSettings(method, uri, secret) {
4444
return requestSettings;
4545
}
4646

47-
4847
function callback(err, response, body) {
4948
if (err) {
5049
this.emit('error', err);

lib/triggers/receive.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-underscore-dangle,no-param-reassign */
22
exports.process = async function receive(msg) {
33
const msgId = msg.id;
4-
this.logger.info('Received new message:\n', JSON.stringify(msg));
4+
this.logger.info('Received new message');
55

66
if (msg.body) {
77
if (msg.query) {
@@ -22,8 +22,7 @@ exports.process = async function receive(msg) {
2222
if (msg.additionalUrlPath) {
2323
msg.body._additionalUrlPath = msg.additionalUrlPath;
2424
}
25-
26-
this.logger.info('Updated body: \n', JSON.stringify(msg.body));
25+
2726
}
2827

2928
this.logger.info('Emitting data of message: ', msgId);

0 commit comments

Comments
 (0)