Skip to content

Commit cc64dde

Browse files
kdai7Katie Dai
andauthored
add details to log (#311)
* add details to log * npm audit fix Co-authored-by: Katie Dai <kdai7@ibm.com>
1 parent ece5739 commit cc64dde

File tree

2 files changed

+17
-23
lines changed

2 files changed

+17
-23
lines changed

lib/Watchman.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ module.exports = class Watchman {
124124
parser.on('data', (data) => {
125125
if (data.type === 'ERROR') {
126126
if (this._logger) {
127-
this._logger.error(`GET ${this._requestOptions.uri} errored`, JSON.stringify(data.object));
127+
this._logger.error(`GET ${this._requestOptions.uri} errored at data.type === ERROR`, JSON.stringify(data.object));
128128
}
129129
this._watchError();
130130
} else {
@@ -133,7 +133,7 @@ module.exports = class Watchman {
133133
});
134134
parser.on('error', (err) => {
135135
if (this._logger) {
136-
this._logger.error(`GET ${this._requestOptions.uri} errored`, err);
136+
this._logger.error(`GET ${this._requestOptions.uri} errored at parser.on error`, err);
137137
}
138138
this._watchError();
139139
});

package-lock.json

Lines changed: 15 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)