Skip to content

Commit

Permalink
Revert "[grpc_trace] protect some log statements behind trace flags (g…
Browse files Browse the repository at this point in the history
…rpc#36956) (grpc#37129)"

This reverts commit ef8a71c.
  • Loading branch information
alto-ruby committed Jul 11, 2024
1 parent 2e0a043 commit 23d1ff5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,7 @@ Epoll1Poller::Epoll1Poller(Scheduler* scheduler)
wakeup_fd_ = *CreateWakeupFd();
CHECK(wakeup_fd_ != nullptr);
CHECK_GE(g_epoll_set_.epfd, 0);
GRPC_TRACE_LOG(event_engine_poller, INFO)
<< "grpc epoll fd: " << g_epoll_set_.epfd;
LOG(INFO) << "grpc epoll fd: " << g_epoll_set_.epfd;
struct epoll_event ev;
ev.events = static_cast<uint32_t>(EPOLLIN | EPOLLET);
ev.data.ptr = wakeup_fd_.get();
Expand Down
7 changes: 2 additions & 5 deletions src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -627,15 +627,12 @@ void PosixSocketWrapper::TrySetSocketTcpUserTimeout(
// if it is available.
if (g_socket_supports_tcp_user_timeout.load() == 0) {
if (0 != getsockopt(fd_, IPPROTO_TCP, TCP_USER_TIMEOUT, &newval, &len)) {
// This log is intentionally not protected behind a flag, so that users
// know that TCP_USER_TIMEOUT is not being used.
LOG(INFO) << "TCP_USER_TIMEOUT is not available. TCP_USER_TIMEOUT "
"won't be used thereafter";
g_socket_supports_tcp_user_timeout.store(-1);
} else {
GRPC_TRACE_LOG(tcp, INFO)
<< "TCP_USER_TIMEOUT is available. TCP_USER_TIMEOUT will be "
"used thereafter";
LOG(INFO) << "TCP_USER_TIMEOUT is available. TCP_USER_TIMEOUT will be "
"used thereafter";
g_socket_supports_tcp_user_timeout.store(1);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/lib/iomgr/ev_epoll1_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static bool epoll_set_init() {
return false;
}

GRPC_TRACE_LOG(polling, INFO) << "grpc epoll fd: " << g_epoll_set.epfd;
gpr_log(GPR_INFO, "grpc epoll fd: %d", g_epoll_set.epfd);
gpr_atm_no_barrier_store(&g_epoll_set.num_events, 0);
gpr_atm_no_barrier_store(&g_epoll_set.cursor, 0);
return true;
Expand Down

0 comments on commit 23d1ff5

Please sign in to comment.