Skip to content

Commit

Permalink
Merge pull request #180 from openBackhaul/schiavi-siae/issue179
Browse files Browse the repository at this point in the history
Remove verbose log
  • Loading branch information
schiavi-siae authored Dec 20, 2023
2 parents 6f0f5e7 + 1b36f49 commit 0b0aaa9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
10 changes: 5 additions & 5 deletions server/service/IndividualServicesService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand All @@ -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";
}

Expand Down Expand Up @@ -1226,7 +1226,7 @@ async function PromptForUpdatingMacTableFromDeviceCausesLtpUuidBeingTranslatedIn
};
}

console.log("STEP3(" + mountName + "): " + finalUrl);
//console.log("STEP3(" + mountName + "): " + finalUrl);
return (additionaResponse);
} catch (error) {
additionaResponse = {
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -55,7 +58,7 @@ function prepareObjectForWindow(deviceListIndex) {
};
return windowObject;
} catch (error) {
console.log("Error in prepareObjectForWindow (" + error + ")");
console.error("Error in prepareObjectForWindow (" + error + ")");
debugger;
}
}
Expand Down Expand Up @@ -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);
}

Expand All @@ -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);
}

}
Expand Down Expand Up @@ -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";
Expand All @@ -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();

}
Expand Down

0 comments on commit 0b0aaa9

Please sign in to comment.