Log error to stderr

pull/18524/head
yang-g 6 years ago
parent c73c724778
commit 8f77928e04
  1. 15
      test/cpp/util/proto_reflection_descriptor_database.cc

@ -44,14 +44,17 @@ ProtoReflectionDescriptorDatabase::~ProtoReflectionDescriptorDatabase() {
Status status = stream_->Finish();
if (!status.ok()) {
if (status.error_code() == StatusCode::UNIMPLEMENTED) {
gpr_log(GPR_INFO,
fprintf(stderr,
"Reflection request not implemented; "
"is the ServerReflection service enabled?");
"is the ServerReflection service enabled?\n");
} else {
fprintf(stderr,
"ServerReflectionInfo rpc failed. Error code: %d, message: %s, "
"debug info: %s\n",
static_cast<int>(status.error_code()),
status.error_message().c_str(),
ctx_.debug_error_string().c_str());
}
gpr_log(GPR_INFO,
"ServerReflectionInfo rpc failed. Error code: %d, details: %s",
static_cast<int>(status.error_code()),
status.error_message().c_str());
}
}
}

Loading…
Cancel
Save