BearND has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/405240 )
Change subject: Dev: debug log for RESTBase requests, too
......................................................................
Dev: debug log for RESTBase requests, too
Change-Id: I2cb1d4299a15c87274544f2dc3ae66b8cc2d21f2
---
M lib/api-util.js
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps
refs/changes/40/405240/1
diff --git a/lib/api-util.js b/lib/api-util.js
index b2f8b7c..8ba63f0 100644
--- a/lib/api-util.js
+++ b/lib/api-util.js
@@ -14,6 +14,7 @@
// just because GETs are easier to run from commandline or see it in a
browser
return `${request.uri}?${querystring.stringify(request.body)}`;
}
+
/**
* Calls the MW API with the supplied query as its body
* @param {!Object} app the application object
@@ -110,6 +111,10 @@
}
});
+ if (app.conf.debug) {
+ app.logger.log(`trace/restApiGet`, { msg: 'outgoing request', to:
request.uri });
+ }
+
return preq(request);
}
--
To view, visit https://gerrit.wikimedia.org/r/405240
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cb1d4299a15c87274544f2dc3ae66b8cc2d21f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits