Skip to content

Commit

Permalink
add details to log (#311)
Browse files Browse the repository at this point in the history
* add details to log

* npm audit fix

Co-authored-by: Katie Dai <kdai7@ibm.com>
  • Loading branch information
kdai7 and Katie Dai committed Jan 26, 2023
1 parent ece5739 commit cc64dde
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
4 changes: 2 additions & 2 deletions lib/Watchman.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ module.exports = class Watchman {
parser.on('data', (data) => {
if (data.type === 'ERROR') {
if (this._logger) {
this._logger.error(`GET ${this._requestOptions.uri} errored`, JSON.stringify(data.object));
this._logger.error(`GET ${this._requestOptions.uri} errored at data.type === ERROR`, JSON.stringify(data.object));
}
this._watchError();
} else {
Expand All @@ -133,7 +133,7 @@ module.exports = class Watchman {
});
parser.on('error', (err) => {
if (this._logger) {
this._logger.error(`GET ${this._requestOptions.uri} errored`, err);
this._logger.error(`GET ${this._requestOptions.uri} errored at parser.on error`, err);
}
this._watchError();
});
Expand Down
36 changes: 15 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cc64dde

Please sign in to comment.