BearND has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/405239 )
Change subject: Dev: debug log for MW API requests when debug is true in config
......................................................................
Dev: debug log for MW API requests when debug is true in config
The config.dev.yaml file already has a debug setting of true. This is
more convenient since then all developers get this debug info by
default.
Change-Id: If119f3fd173aabbe458d874b439a9b870e5f2f45
---
M lib/api-util.js
1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps
refs/changes/39/405239/1
diff --git a/lib/api-util.js b/lib/api-util.js
index fe1cd78..b2f8b7c 100644
--- a/lib/api-util.js
+++ b/lib/api-util.js
@@ -8,7 +8,6 @@
const HTTPError = sUtil.HTTPError;
const MAX_BATCH_SIZE = 50;
-const DEBUG = process.env.DEBUG_MW_REQUESTS;
function prettyMwApiReq(request) {
// formatting it as GET request even though we use POST requests for MW
API,
@@ -35,7 +34,7 @@
}
});
- if (DEBUG) {
+ if (app.conf.debug) {
app.logger.log(`trace/mwApiGet`, { msg: 'outgoing request', to:
prettyMwApiReq(request) });
}
--
To view, visit https://gerrit.wikimedia.org/r/405239
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If119f3fd173aabbe458d874b439a9b870e5f2f45
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