improved some log messages
This commit is contained in:
parent
1881d8f488
commit
043d431e94
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user