[Gpr_To_Absl_Logging] Minor fix

pull/37190/head
tanvi-jagtap 7 months ago
parent f9bdcc142c
commit a47b297ccb
  1. 25
      BUILD
  2. 11
      src/core/BUILD
  3. 50
      src/core/lib/surface/api_trace.h

25
BUILD

@ -579,7 +579,6 @@ grpc_cc_library(
],
visibility = ["@grpc:public"],
deps = [
"api_trace",
"channel_arg_names",
"channel_stack_builder",
"config",
@ -659,7 +658,6 @@ grpc_cc_library(
"@grpc:public",
],
deps = [
"api_trace",
"channel_arg_names",
"channel_stack_builder",
"config",
@ -1151,7 +1149,6 @@ grpc_cc_library(
],
tags = ["nofixdeps"],
deps = [
"api_trace",
"channel",
"channel_create",
"config",
@ -1329,7 +1326,6 @@ grpc_cc_library(
],
visibility = ["@grpc:public"],
deps = [
"api_trace",
"gpr",
"grpc_base",
"grpc_public_hdrs",
@ -1477,21 +1473,6 @@ grpc_cc_library(
],
)
grpc_cc_library(
name = "api_trace",
hdrs = [
"//src/core:lib/surface/api_trace.h",
],
external_deps = [
"absl/log:log",
],
language = "c++",
deps = [
"gpr",
"grpc_trace",
],
)
grpc_cc_library(
name = "byte_buffer",
srcs = [
@ -1763,7 +1744,6 @@ grpc_cc_library(
language = "c++",
visibility = ["@grpc:alt_grpc_base_legacy"],
deps = [
"api_trace",
"channel_arg_names",
"channelz",
"cpp_impl_of",
@ -1809,7 +1789,6 @@ grpc_cc_library(
language = "c++",
visibility = ["@grpc:alt_grpc_base_legacy"],
deps = [
"api_trace",
"channel",
"channelz",
"config",
@ -1905,7 +1884,6 @@ grpc_cc_library(
language = "c++",
visibility = ["@grpc:alt_grpc_base_legacy"],
deps = [
"api_trace",
"call_combiner",
"call_tracer",
"channel",
@ -2035,7 +2013,6 @@ grpc_cc_library(
public_hdrs = GRPC_PUBLIC_HDRS + GRPC_PUBLIC_EVENT_ENGINE_HDRS,
visibility = ["@grpc:alt_grpc_base_legacy"],
deps = [
"api_trace",
"call_combiner",
"call_tracer",
"channel",
@ -2299,7 +2276,6 @@ grpc_cc_library(
public_hdrs = GRPC_PUBLIC_HDRS,
visibility = ["@grpc:public"],
deps = [
"api_trace",
"channel_arg_names",
"channelz",
"config",
@ -4090,7 +4066,6 @@ grpc_cc_library(
language = "c++",
visibility = ["@grpc:public"],
deps = [
"api_trace",
"exec_ctx",
"gpr",
"grpc_base",

@ -4101,7 +4101,6 @@ grpc_cc_library(
"iomgr_fwd",
"unique_type_name",
"useful",
"//:api_trace",
"//:channel_arg_names",
"//:debug_location",
"//:exec_ctx",
@ -4160,7 +4159,6 @@ grpc_cc_library(
"unique_type_name",
"useful",
"//:alts_util",
"//:api_trace",
"//:channel_arg_names",
"//:exec_ctx",
"//:gpr",
@ -4237,7 +4235,6 @@ grpc_cc_library(
"status_helper",
"unique_type_name",
"useful",
"//:api_trace",
"//:channel_arg_names",
"//:debug_location",
"//:exec_ctx",
@ -4280,7 +4277,6 @@ grpc_cc_library(
"slice",
"unique_type_name",
"useful",
"//:api_trace",
"//:exec_ctx",
"//:gpr",
"//:grpc_base",
@ -4331,7 +4327,6 @@ grpc_cc_library(
"time",
"unique_type_name",
"useful",
"//:api_trace",
"//:gpr",
"//:grpc_base",
"//:grpc_core_credentials_header",
@ -5711,7 +5706,6 @@ grpc_cc_library(
"xds_http_filter",
"xds_listener",
"xds_route_config",
"//:api_trace",
"//:config",
"//:debug_location",
"//:exec_ctx",
@ -7305,7 +7299,6 @@ grpc_cc_library(
"tcp_connect_handshaker",
"time",
"unique_type_name",
"//:api_trace",
"//:channel",
"//:channel_arg_names",
"//:channel_create",
@ -7367,7 +7360,6 @@ grpc_cc_library(
"status_helper",
"time",
"unique_type_name",
"//:api_trace",
"//:channel_arg_names",
"//:channelz",
"//:chttp2_legacy_frame",
@ -7427,7 +7419,6 @@ grpc_cc_library(
"status_helper",
"time",
"try_seq",
"//:api_trace",
"//:channel",
"//:channel_arg_names",
"//:channel_create",
@ -8111,7 +8102,6 @@ grpc_cc_library(
"ref_counted_string",
"slice",
"useful",
"//:api_trace",
"//:gpr",
"//:grpc_public_hdrs",
"//:grpc_trace",
@ -8236,7 +8226,6 @@ grpc_cc_library(
"time",
"try_seq",
"wait_for_callback",
"//:api_trace",
"//:channel",
"//:channel_create",
"//:config",

@ -1,50 +0,0 @@
//
//
// Copyright 2015 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//
#ifndef GRPC_SRC_CORE_LIB_SURFACE_API_TRACE_H
#define GRPC_SRC_CORE_LIB_SURFACE_API_TRACE_H
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/debug/trace.h"
// Provide unwrapping macros because we're in C89 and variadic macros weren't
// introduced until C99...
#define GRPC_API_TRACE_UNWRAP0()
#define GRPC_API_TRACE_UNWRAP1(a) , a
#define GRPC_API_TRACE_UNWRAP2(a, b) , a, b
#define GRPC_API_TRACE_UNWRAP3(a, b, c) , a, b, c
#define GRPC_API_TRACE_UNWRAP4(a, b, c, d) , a, b, c, d
#define GRPC_API_TRACE_UNWRAP5(a, b, c, d, e) , a, b, c, d, e
#define GRPC_API_TRACE_UNWRAP6(a, b, c, d, e, f) , a, b, c, d, e, f
#define GRPC_API_TRACE_UNWRAP7(a, b, c, d, e, f, g) , a, b, c, d, e, f, g
#define GRPC_API_TRACE_UNWRAP8(a, b, c, d, e, f, g, h) , a, b, c, d, e, f, g, h
#define GRPC_API_TRACE_UNWRAP9(a, b, c, d, e, f, g, h, i) \
, a, b, c, d, e, f, g, h, i
#define GRPC_API_TRACE_UNWRAP10(a, b, c, d, e, f, g, h, i, j) \
, a, b, c, d, e, f, g, h, i, j
// Due to the limitations of C89's preprocessor, the arity of the var-arg list
// 'nargs' must be specified.
#define GRPC_API_TRACE(fmt, nargs, args) \
if (GRPC_TRACE_FLAG_ENABLED(api)) { \
gpr_log(GPR_INFO, fmt GRPC_API_TRACE_UNWRAP##nargs args); \
}
#endif // GRPC_SRC_CORE_LIB_SURFACE_API_TRACE_H
Loading…
Cancel
Save