Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_log #36595

Closed

Conversation

tanvi-jagtap
Copy link
Contributor

[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_log
In this CL we are migrating from gRPCs own gpr logging mechanism to absl logging mechanism. The intention is to deprecate gpr_log in the future.
We have the following mapping

  1. gpr_log(GPR_INFO,...) -> LOG(INFO)
  2. gpr_log(GPR_ERROR,...) -> LOG(ERROR)
  3. gpr_log(GPR_DEBUG,...) -> VLOG(2)
    Reviewers need to check :
  4. If the above mapping is correct.
  5. The content of the log is as before.
    gpr_log format strings did not use string_view or std::string . absl LOG accepts these. So there will be some elimination of string_view and std::string related conversions. This is expected.

@tanvi-jagtap tanvi-jagtap deleted the regex_test_core_iomgr_transport branch May 13, 2024 09:33
@tanvi-jagtap tanvi-jagtap restored the regex_test_core_iomgr_transport branch May 13, 2024 14:36
@tanvi-jagtap tanvi-jagtap reopened this May 13, 2024
@tanvi-jagtap tanvi-jagtap marked this pull request as ready for review May 14, 2024 05:15
@tanvi-jagtap tanvi-jagtap requested review from yousukseung and removed request for ananda1066 May 14, 2024 06:18
@@ -59,7 +60,7 @@
#include "src/core/lib/resource_quota/api.h"
#include "test/core/test_util/port.h"

#define LOG_TEST(x) gpr_log(GPR_INFO, "%s", #x)
#define LOG_TEST(x) LOG(INFO) << #x
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we remove this macro? I see there's no good point now that we have LOG(INFO).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually a very nice catch . Multiple files are doing this. I will address all files in a single PR.
Thanks for catching this.
😃

Copy link
Contributor

@yousukseung yousukseung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit comment, otherwise LGTM.

@tanvi-jagtap tanvi-jagtap deleted the regex_test_core_iomgr_transport branch May 14, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants