[Gpr_To_Absl_Logging] Fix code review comments

pull/36962/head
tanvi-jagtap 8 months ago
parent 6327c497c5
commit 131977d4f6
  1. 1
      src/php/README.md
  2. 38
      src/php/ext/grpc/php_grpc.c

@ -336,7 +336,6 @@ all possible values of the `grpc.grpc.trace` option, please check
```
grpc.grpc_verbosity=debug
grpc.grpc_trace=all,-polling,-polling_api,-pollable_refcount,-timer,-timer_check
grpc.log_filename=/var/log/grpc.log
```
> Make sure the log file above is writable, by doing the following:

@ -90,8 +90,6 @@ ZEND_GET_MODULE(grpc)
grpc_verbosity, zend_grpc_globals, grpc_globals)
STD_PHP_INI_ENTRY("grpc.grpc_trace", NULL, PHP_INI_SYSTEM, OnUpdateString,
grpc_trace, zend_grpc_globals, grpc_globals)
STD_PHP_INI_ENTRY("grpc.log_filename", NULL, PHP_INI_SYSTEM, OnUpdateString,
log_filename, zend_grpc_globals, grpc_globals)
PHP_INI_END()
/* }}} */
@ -249,41 +247,6 @@ void apply_ini_settings(TSRMLS_D) {
}
}
// static void custom_logger(gpr_log_func_args* args) {
// TSRMLS_FETCH();
// const char* final_slash;
// const char* display_file;
// char* prefix;
// char* final;
// gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
// final_slash = strrchr(args->file, '/');
// if (final_slash) {
// display_file = final_slash + 1;
// } else {
// display_file = args->file;
// }
// FILE *fp = fopen(GRPC_G(log_filename), "ab");
// if (!fp) {
// return;
// }
// gpr_asprintf(&prefix, "%s%" PRId64 ".%09" PRId32 " %s:%d]",
// gpr_log_severity_string(args->severity), now.tv_sec,
// now.tv_nsec, display_file, args->line);
// gpr_asprintf(&final, "%-60s %s\n", prefix, args->message);
// fprintf(fp, "%s", final);
// fclose(fp);
// gpr_free(prefix);
// gpr_free(final);
// }
/* {{{ PHP_MINIT_FUNCTION
*/
PHP_MINIT_FUNCTION(grpc) {
REGISTER_INI_ENTRIES();
@ -613,7 +576,6 @@ static PHP_GINIT_FUNCTION(grpc) {
grpc_globals->poll_strategy = NULL;
grpc_globals->grpc_verbosity = NULL;
grpc_globals->grpc_trace = NULL;
grpc_globals->log_filename = NULL;
}
/* }}} */

Loading…
Cancel
Save