From 23d1ff562df873595eef2cd639afa4869b51f937 Mon Sep 17 00:00:00 2001 From: alto-ruby Date: Thu, 11 Jul 2024 00:07:12 +0000 Subject: [PATCH] Revert "[grpc_trace] protect some log statements behind trace flags (#36956) (#37129)" This reverts commit ef8a71c27c32d68dc813019308fc4b7f518aaaa1. --- src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc | 3 +-- src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc | 7 ++----- src/core/lib/iomgr/ev_epoll1_linux.cc | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc b/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc index c990fe4023377b..682a13d2b6481d 100644 --- a/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +++ b/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc @@ -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(EPOLLIN | EPOLLET); ev.data.ptr = wakeup_fd_.get(); diff --git a/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc b/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc index f43a7e06c49316..46c41263bfb190 100644 --- a/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +++ b/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc @@ -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); } } diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc index 6b4ebacac99b85..bf266705d92668 100644 --- a/src/core/lib/iomgr/ev_epoll1_linux.cc +++ b/src/core/lib/iomgr/ev_epoll1_linux.cc @@ -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;