forked from huawei/mindspore2022
Modify log level
This commit is contained in:
parent
2f06178fa9
commit
0b83f0f18b
|
|
@ -279,11 +279,11 @@ void AbstractNode::StartHeartbeatTimer(const std::shared_ptr<TcpClient> &client)
|
|||
heart_beat_thread_ = std::make_unique<std::thread>([&]() {
|
||||
while (!is_finish_.load()) {
|
||||
if (!Heartbeat(client)) {
|
||||
MS_LOG(ERROR) << "The node role is:" << CommUtil::NodeRoleToString(node_info_.node_role_)
|
||||
<< ", the node id is:" << node_info_.node_id_ << " Send heartbeat timeout!";
|
||||
MS_LOG(WARNING) << "The node role is:" << CommUtil::NodeRoleToString(node_info_.node_role_)
|
||||
<< ", the node id is:" << node_info_.node_id_ << " Send heartbeat timeout!";
|
||||
if (!CheckSchedulerTimeout() && on_node_event_message_) {
|
||||
MS_LOG(ERROR) << "The node role is:" << CommUtil::NodeRoleToString(node_info_.node_role_)
|
||||
<< ", the node id is:" << node_info_.node_id_ << " exited due to scheduler timeout!";
|
||||
MS_LOG(WARNING) << "The node role is:" << CommUtil::NodeRoleToString(node_info_.node_role_)
|
||||
<< ", the node id is:" << node_info_.node_id_ << " exited due to scheduler timeout!";
|
||||
is_finish_ = true;
|
||||
wait_finish_cond_.notify_all();
|
||||
on_node_event_message_(NodeEvent::SCHEDULER_TIMEOUT);
|
||||
|
|
@ -306,7 +306,7 @@ bool AbstractNode::Heartbeat(const std::shared_ptr<TcpClient> &client, bool is_n
|
|||
|
||||
if (!SendMessageSync(client, meta, Protos::PROTOBUF, heartbeat_message.SerializeAsString().data(),
|
||||
heartbeat_message.ByteSizeLong())) {
|
||||
MS_LOG(ERROR) << "The node id:" << node_info_.node_id_ << " Send heartbeat timeout!";
|
||||
MS_LOG(WARNING) << "The node id:" << node_info_.node_id_ << " Send heartbeat timeout!";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -220,12 +220,12 @@ void TcpClient::EventCallback(struct bufferevent *bev, std::int16_t events, void
|
|||
SetTcpNoDelay(fd);
|
||||
MS_LOG(INFO) << "Client connected!";
|
||||
} else if (events & BEV_EVENT_ERROR) {
|
||||
MS_LOG(ERROR) << "Client connected error!";
|
||||
MS_LOG(WARNING) << "Client connected BEV_EVENT_ERROR!";
|
||||
if (tcp_client->disconnected_callback_) {
|
||||
tcp_client->disconnected_callback_();
|
||||
}
|
||||
} else if (events & BEV_EVENT_EOF) {
|
||||
MS_LOG(ERROR) << "Client connected end of file";
|
||||
MS_LOG(WARNING) << "Client connected end of file";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ void TcpServer::EventCallback(struct bufferevent *bev, std::int16_t events, void
|
|||
srv->RemoveConnection(conn->GetFd());
|
||||
bufferevent_free(bev);
|
||||
} else if (events & BEV_EVENT_ERROR) {
|
||||
MS_LOG(ERROR) << "Event buffer remain data: " << remain;
|
||||
MS_LOG(WARNING) << "Event buffer remain data: " << remain;
|
||||
// Free connection structures
|
||||
srv->RemoveConnection(conn->GetFd());
|
||||
bufferevent_free(bev);
|
||||
|
|
@ -385,7 +385,7 @@ void TcpServer::EventCallback(struct bufferevent *bev, std::int16_t events, void
|
|||
srv->client_disconnection_(*srv, *conn);
|
||||
}
|
||||
} else {
|
||||
MS_LOG(ERROR) << "Unhandled event!";
|
||||
MS_LOG(WARNING) << "Unhandled event!";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue