[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Dev: debug log for MW API requests when debug is true in config

2018-01-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
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(-)

Approvals:
  jenkins-bot: Verified
  Mholloway: Looks good to me, approved



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: merged
Gerrit-Change-Id: If119f3fd173aabbe458d874b439a9b870e5f2f45
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Ppchelko 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Dev: debug log for MW API requests when debug is true in config

2018-01-18 Thread BearND (Code Review)
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 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits