From 9a12dfb91bbcb7975534a089b9503af7bdedbb1f Mon Sep 17 00:00:00 2001 From: kamidu Date: Thu, 10 Aug 2017 16:49:02 +0530 Subject: [PATCH] enable JS level audit logs for device cloud --- .../app/modules/oauth/token-protected-service-invokers.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-protected-service-invokers.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-protected-service-invokers.js index cfde7134b60..5f8462a795f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-protected-service-invokers.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-protected-service-invokers.js @@ -116,6 +116,11 @@ var invokers = function () { log.debug("Request payload if any : " + stringify(requestPayload)); log.debug("Response status : " + xmlHttpRequest.status); log.debug("Response payload if any : " + xmlHttpRequest.responseText); + if (devicemgtProps["isCloud"]) { + log.info("Request : " + httpMethod + " " + endpoint); + log.info("Request payload if any : " + stringify(requestPayload)); + log.info("Response status : " + xmlHttpRequest.status); + } if (xmlHttpRequest.status == 401) { if ((xmlHttpRequest.responseText == TOKEN_EXPIRED ||