mirror of https://github.com/grpc/grpc.git
[Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_set_log_function (#36844)
[Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_set_log_function
Adding a warning for users of gpr_set_log_function.
This function will be deleted soon.
https://github.com/grpc/proposal/pull/425
Other options considered ( and discarded )
1. Using DFATAL instead of ERROR. Discarded this because we still have one critical unit test to clean up before we delete gpr_set_log_function. This test will fail if we use DFATAL. EXPECT_DFATAL macro is not available to be used.
2. Considered making a new absl log sink , and then that log sink should have a function pointer with the same signature as gpr_log_func. This function pointer can be set from gpr_set_log_function. However if this custom function uses absl from within it, that will cause infinite recursion. Made me drop the idea.
Closes #36844
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36844 from tanvi-jagtap:assert_gpr_set_log_function 805de358a9
PiperOrigin-RevId: 641473969
pull/36800/head^2
parent
e6e2f1e1cb
commit
cd595a8794
1 changed files with 10 additions and 0 deletions
Loading…
Reference in new issue