Commit 7032735d authored by hengwen's avatar hengwen
Browse files

Update log

parent 204c711c
......@@ -29,8 +29,7 @@ public class RpcServer implements RegistableService{
}
private void start() throws IOException{
logger.info("Server starting on port %d\n", port);
logger.info("Server starting on port {}", port);
server = ServerBuilder.forPort(port)
.addService(new SimulationControllerImpl())
......@@ -96,6 +95,6 @@ public class RpcServer implements RegistableService{
zk.delete(path);
zk.createEphemeral(path);
zkPath = path;
logger.info("%s is online\n", path);
logger.info("{} is online", path);
}
}
......@@ -112,7 +112,7 @@ public class SimulationObserver implements SimulationLoopNotifiable {
double targetY = trajectoryY.get(trajectoryY.size() - 1);
double dist = Math.sqrt(Math.pow(targetX - position[0], 2) + Math.pow(targetY - position[1], 2));
String msg = String.format("id: %s, position: [%.8f, %.8f, %.6f], target: (%.8f, %.8f), dist: %.8f\n",
String msg = String.format("id: %s, position: [%.8f, %.8f, %.6f], target: (%.8f, %.8f), dist: %.8f",
id, position[0], position[1], position[2], targetX, targetY, dist);
logger.info(msg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment