diff --git a/server/service/IndividualServicesService.js b/server/service/IndividualServicesService.js index 1a96208..2625e25 100644 --- a/server/service/IndividualServicesService.js +++ b/server/service/IndividualServicesService.js @@ -1044,7 +1044,7 @@ async function PromptForUpdatingMacTableFromDeviceCausesUuidOfMacFdBeingSearched }); if (response.status === 200) { - console.log("STEP1(" + mountName + "): " + newBaseUrl + 'fields=' + fields); + //console.log("STEP1(" + mountName + "): " + newBaseUrl + 'fields=' + fields); return (response.data); } else { @@ -1130,7 +1130,7 @@ async function PromptForUpdatingMacTableFromDeviceCausesMacTableBeingRetrievedFr let response = await axios.post(fullUrl, data, { headers: httpRequestHeaderAuth }); - console.log("STEP2(" + mountName + "): " + fullUrl); + //console.log("STEP2(" + mountName + "): " + fullUrl); return response.data; } catch (error) { throw error; @@ -1148,7 +1148,7 @@ async function PromptForUpdatingMacTableFromDeviceCausesLtpUuidBeingTranslatedIn try { if (body == "LTP-MNGT") { - console.log("STEP3(" + mountName + ") = LAN-MNGT"); + //console.log("STEP3(" + mountName + ") = LAN-MNGT"); return "LAN-MNGT"; } @@ -1226,7 +1226,7 @@ async function PromptForUpdatingMacTableFromDeviceCausesLtpUuidBeingTranslatedIn }; } - console.log("STEP3(" + mountName + "): " + finalUrl); + //console.log("STEP3(" + mountName + "): " + finalUrl); return (additionaResponse); } catch (error) { additionaResponse = { @@ -1547,7 +1547,7 @@ exports.readCurrentMacTableFromDevice = async function (body, user, originator, console.error('STEP4(' + mountName + '):' + error.message); throw (error.message + '(STEP4)'); } - console.log('STEP4(' + mountName + ')'); + //console.log('STEP4(' + mountName + ')'); result['application/json'] = { "request-id": reqId diff --git a/server/service/individualServices/CyclicProcessService/cyclicProcess.js b/server/service/individualServices/CyclicProcessService/cyclicProcess.js index cf66536..9966499 100644 --- a/server/service/individualServices/CyclicProcessService/cyclicProcess.js +++ b/server/service/individualServices/CyclicProcessService/cyclicProcess.js @@ -28,6 +28,9 @@ async function sendRequest(device, user, originator, xCorrelator, traceIndicator "mount-name": device['node-id'] }; + console.log("Send Request (" + body["mount-name"] + ")"); + + try { ret = await individualServices.readCurrentMacTableFromDevice(body, user, originator, xCorrelator, traceIndicator, customerJourney); return { @@ -55,7 +58,7 @@ function prepareObjectForWindow(deviceListIndex) { }; return windowObject; } catch (error) { - console.log("Error in prepareObjectForWindow (" + error + ")"); + console.error("Error in prepareObjectForWindow (" + error + ")"); debugger; } } @@ -283,7 +286,7 @@ async function requestMessage(index) { requestMessage(slidingWindow.length - 1); } else { - printLog(printListDevice('Device List', deviceList), print_log_level >= 2); + //printLog(printListDevice('Device List', deviceList), print_log_level >= 2); printLog('Sliding Window IS EMPTY', print_log_level >= 1); } @@ -305,13 +308,13 @@ async function requestMessage(index) { slidingWindow.splice(elementIndex, 1); if (addNextDeviceListElementInWindow()) { printLog('Add element ' + slidingWindow[slidingWindow.length - 1]['node-id'] + ' in Sliding Window and send request...', print_log_level >= 2); - printLog(printListDevice('Device List', deviceList), print_log_level >= 2); - printLog(printList('Sliding Window', slidingWindow), print_log_level >= 1); + //printLog(printListDevice('Device List', deviceList), print_log_level >= 2); + //printLog(printList('Sliding Window', slidingWindow), print_log_level >= 1); requestMessage(slidingWindow.length - 1); } else { - printLog(printListDevice('Device List', deviceList), print_log_level >= 2); - printLog(printList('Sliding Window', slidingWindow), print_log_level >= 1); + //printLog(printListDevice('Device List', deviceList), print_log_level >= 2); + //printLog(printList('Sliding Window', slidingWindow), print_log_level >= 1); } } @@ -361,7 +364,7 @@ async function MATRCycle(logging_level) { //TO FIX let user = "User Name"; - let originator = "Resolver"; + let originator = "MacAddressTableResolver"; let xCorrelator = "550e8400-e29b-11d4-a716-446655440000"; let traceIndicator = "1.3.1"; let customerJourney = "Unknown value"; @@ -379,10 +382,10 @@ async function MATRCycle(logging_level) { for (let i = 0; i < slidingWindowSize; i++) { addNextDeviceListElementInWindow(); requestMessage(i); - printLog('Element ' + slidingWindow[i]['node-id'] + ' send request...', print_log_level >= 2); + //printLog('Element ' + slidingWindow[i]['node-id'] + ' send request...', print_log_level >= 2); } - printLog(printList('Sliding Window - MAIN', slidingWindow), print_log_level >= 1); + //printLog(printList('Sliding Window - MAIN', slidingWindow), print_log_level >= 1); startTtlChecking(); }