improved some log messages

This commit is contained in:
Djeeberjr 2022-03-04 13:28:25 +01:00
parent 1881d8f488
commit 043d431e94
3 changed files with 3 additions and 5 deletions

View File

@ -216,7 +216,7 @@ class KernelEvents {
case "websocket_success":
this.onWebsocketSuccessTrigger.trigger({url: event[2], handle: event[3]});
default:
Log.error("Unknown cc event: " + eventName);
Log.error('Unknown event: $eventName');
}
}

View File

@ -127,7 +127,7 @@ class Net {
}
if (!protoHandlers.exists(proto)) {
Log.warn("Trying to route package to proto: \"" + proto + "\" but nothing was register");
Log.warn('Trying to route package to proto: $proto but nothing was register');
return;
}

View File

@ -95,7 +95,7 @@ class Routing {
}
false;
default:
Log.error("Expected RouteDiscover or RouteDiscoverResponse type");
Log.error("Expected package to be a Route discover package");
false;
};
@ -153,13 +153,11 @@ class Routing {
if (this.routingTable.exists(toID)){
if (this.routingTable[toID].cost > fullCost){
Log.info("Better route: " + toID + " -> " + interf.name() + ":$"+fullCost);
this.routingTable[toID] = {interf:interf,cost:cost + interf.getBaseRoutingCost(),rep: rep};
this.prepareRouteUpdate();
}
}else{
this.routingTable[toID] = {interf:interf,cost:cost + interf.getBaseRoutingCost(),rep: rep};
Log.info("New route: " + toID + " -> " + interf.name() + ":$"+fullCost);
this.onNewNeigborTrigger.trigger(toID);
this.prepareRouteUpdate();
}