runtime: return new node name for logging
@@ -99,7 +99,7 @@ std::string OakRuntime::NextNodeName(const std::string& config) {
// Create (but don't start) a new Node instance. Return a borrowed pointer to
// the new Node (or nullptr on failure).
-OakNode* OakRuntime::CreateNode(const std::string& config, std::string* /*node_name*/) {
+OakNode* OakRuntime::CreateNode(const std::string& config, std::string* node_name) {
std::string name = NextNodeName(config);
std::unique_ptr<OakNode> node;
@@ -122,6 +122,7 @@ OakNode* OakRuntime::CreateNode(const std::string& config, std::string* /*node_n
OakNode* result = node.get();
if (node != nullptr) {
nodes_[name] = std::move(node);
+ *node_name = name;
} else {
LOG(ERROR) << "failed to create Node with config of name " << config;
}
