[Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_log

PiperOrigin-RevId: 650112722
pull/37168/head
Tanvi Jagtap 7 months ago committed by Copybara-Service
parent 555cc311d0
commit 5d9f743a40
  1. 6
      src/core/lib/iomgr/ev_apple.cc
  2. 6
      src/core/lib/iomgr/ev_posix.cc
  3. 13
      src/core/lib/iomgr/executor.cc

@ -40,9 +40,9 @@
#include "src/core/lib/iomgr/ev_apple.h"
#ifndef NDEBUG
#define GRPC_POLLING_TRACE(format, ...) \
if (GRPC_TRACE_FLAG_ENABLED(apple_polling)) { \
gpr_log(GPR_DEBUG, "(polling) " format, __VA_ARGS__); \
#define GRPC_POLLING_TRACE(format, ...) \
if (GRPC_TRACE_FLAG_ENABLED(apple_polling)) { \
VLOG(2) << "(polling) " << absl::StrFormat(format, __VA_ARGS__); \
}
#else
#define GRPC_POLLING_TRACE(...)

@ -46,9 +46,9 @@
// Polling API trace only enabled in debug builds
#ifndef NDEBUG
#define GRPC_POLLING_API_TRACE(format, ...) \
if (GRPC_TRACE_FLAG_ENABLED(polling_api)) { \
gpr_log(GPR_INFO, "(polling-api) " format, __VA_ARGS__); \
#define GRPC_POLLING_API_TRACE(format, ...) \
if (GRPC_TRACE_FLAG_ENABLED(polling_api)) { \
LOG(INFO) << "(polling-api) " << absl::StrFormat(format, __VA_ARGS__); \
}
#else
#define GRPC_POLLING_API_TRACE(...)

@ -21,6 +21,8 @@
#include <string.h>
#include "absl/log/check.h"
#include "absl/log/log.h"
#include "absl/strings/str_format.h"
#include <grpc/support/alloc.h>
#include <grpc/support/cpu.h>
@ -28,6 +30,7 @@
#include <grpc/support/port_platform.h>
#include <grpc/support/sync.h>
#include "src/core/lib/debug/trace_impl.h"
#include "src/core/lib/gprpp/crash.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/iomgr/exec_ctx.h"
@ -36,11 +39,11 @@
#define MAX_DEPTH 2
#define EXECUTOR_TRACE(format, ...) \
do { \
if (GRPC_TRACE_FLAG_ENABLED(executor)) { \
gpr_log(GPR_INFO, "EXECUTOR " format, __VA_ARGS__); \
} \
#define EXECUTOR_TRACE(format, ...) \
do { \
if (GRPC_TRACE_FLAG_ENABLED(executor)) { \
LOG(INFO) << "EXECUTOR " << absl::StrFormat(format, __VA_ARGS__); \
} \
} while (0)
namespace grpc_core {

Loading…
Cancel
Save