From 8d1dcbec3f7511ecc757c667872cc4ce59e621e3 Mon Sep 17 00:00:00 2001 From: oblomov <102328295+oblomov-dev@users.noreply.github.com> Date: Fri, 4 Aug 2023 10:44:09 +0200 Subject: [PATCH] update logging function (#454) --- src/z2ui5_cl_http_handler.clas.abap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/z2ui5_cl_http_handler.clas.abap b/src/z2ui5_cl_http_handler.clas.abap index 870d0564..f7b07dff 100644 --- a/src/z2ui5_cl_http_handler.clas.abap +++ b/src/z2ui5_cl_http_handler.clas.abap @@ -297,7 +297,7 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION. |\n| && ` if (sap.z2ui5.checkLogActive) {` && |\n| && ` console.log('Response Object:');` && |\n| && - ` console.log(sap.z2ui5.oResponse);` && |\n| && + ` console.log(JSON.parse( JSON.stringify(sap.z2ui5.oResponse) ) );` && |\n| && ` if (sap.z2ui5.oResponse.PARAMS.S_VIEW.XML !== '') {` && |\n| && ` console.log('UI5-XML-View:');` && |\n| && ` console.log(sap.z2ui5.oResponse.PARAMS.S_VIEW.XML);` && |\n| && @@ -413,6 +413,7 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION. ` sap.z2ui5.oBody = {};` && |\n| && ` sap.z2ui5.oBody.APP_START = sap.z2ui5.APP_START;` && |\n| && ` sap.z2ui5.oController.Roundtrip();` && |\n| && + ` sap.z2ui5.log = () => { console.log(sap.z2ui5.oResponse.OVIEWMODEL ); };` && |\n| && ` });` && |\n| && `` && |\n| && ``.