Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove verbose log #180

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading