Commit 733548de authored by zhujiashun's avatar zhujiashun

health_check_using_rpc: refine logs

parent 7e23ff0d
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
void AfterRevived(Socket* ptr) { void AfterRevived(Socket* ptr) {
LOG(INFO) << "Revived " << *chan << " chan=0x" << (void*)chan LOG(INFO) << "Revived " << *chan << " chan=0x" << (void*)chan
<< " Fake" << *ptr; << " Fake" << *ptr << " (Connectable)";
} }
}; };
......
...@@ -793,7 +793,7 @@ void Socket::Revive() { ...@@ -793,7 +793,7 @@ void Socket::Revive() {
if (_user) { if (_user) {
_user->AfterRevived(this); _user->AfterRevived(this);
} else { } else {
LOG(INFO) << "Revived " << *this; LOG(INFO) << "Revived " << *this << " (Connectable)";
} }
return; return;
} }
...@@ -1023,13 +1023,14 @@ public: ...@@ -1023,13 +1023,14 @@ public:
return; return;
} }
if (!cntl.Failed() || ptr->Failed()) { if (!cntl.Failed() || ptr->Failed()) {
LOG_IF(INFO, !cntl.Failed()) << "AppRevived " LOG_IF(INFO, !cntl.Failed()) << "Succeeded to call "
<< ptr->remote_side() << FLAGS_health_check_path; << ptr->remote_side() << FLAGS_health_check_path;
ptr->_ninflight_app_health_check.fetch_sub( ptr->_ninflight_app_health_check.fetch_sub(
1, butil::memory_order_relaxed); 1, butil::memory_order_relaxed);
return; return;
} }
RPC_VLOG << "Fail to AppCheck, " << cntl.ErrorText(); RPC_VLOG << "Fail to check path=" << FLAGS_health_check_path
<< ", " << cntl.ErrorText();
bthread_usleep(interval_s * 1000000); bthread_usleep(interval_s * 1000000);
cntl.Reset(); cntl.Reset();
cntl.http_request().uri() = FLAGS_health_check_path; cntl.http_request().uri() = FLAGS_health_check_path;
...@@ -1053,7 +1054,7 @@ public: ...@@ -1053,7 +1054,7 @@ public:
<< " was abandoned during health checking"; << " was abandoned during health checking";
return; return;
} }
LOG(INFO) << "AppChecking " << ptr->remote_side() << FLAGS_health_check_path; LOG(INFO) << "Checking path=" << ptr->remote_side() << FLAGS_health_check_path;
OnAppHealthCheckDone* done = new OnAppHealthCheckDone; OnAppHealthCheckDone* done = new OnAppHealthCheckDone;
done->id = id; done->id = id;
done->interval_s = check_interval_s; done->interval_s = check_interval_s;
...@@ -2451,7 +2452,7 @@ int SocketUser::CheckHealth(Socket* ptr) { ...@@ -2451,7 +2452,7 @@ int SocketUser::CheckHealth(Socket* ptr) {
} }
void SocketUser::AfterRevived(Socket* ptr) { void SocketUser::AfterRevived(Socket* ptr) {
LOG(INFO) << "Revived " << *ptr; LOG(INFO) << "Revived " << *ptr << " (Connectable)";
} }
////////// SocketPool ////////////// ////////// SocketPool //////////////
......
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