@@ -159,6 +159,17 @@ StatusRecordOr<std::shared_ptr<ODBCBQClient>> ODBCBQClient::CreateBQClient(
159159 google::cloud::Options options;
160160
161161 std::string pem_file = oauth.ssl_credentials .pem_root_certs ;
162+ LOG (INFO ) << " CreateBQClient:: use_system_trust_store="
163+ << oauth.ssl_credentials .use_system_trust_store ;
164+
165+ LOG (INFO ) << " CreateBQClient:: pem_file="
166+ << pem_file;
167+
168+ LOG (INFO ) << " CreateBQClient:: proxy_host="
169+ << oauth.proxy_options .hostname ;
170+
171+ LOG (INFO ) << " CreateBQClient:: proxy_port="
172+ << oauth.proxy_options .port ;
162173#ifdef _WIN32
163174 bool use_system_trust_store = oauth.ssl_credentials .use_system_trust_store ;
164175 std::string pem_path;
@@ -167,18 +178,25 @@ StatusRecordOr<std::shared_ptr<ODBCBQClient>> ODBCBQClient::CreateBQClient(
167178 if (!pem_path_or) {
168179 return pem_path_or.GetStatusRecord ();
169180 }
170- pem_path = *pem_path_or;
171- options.set <google::cloud::CARootsFilePathOption>(pem_path);
181+ pem_path = *pem_path_or;
182+ LOG (INFO )
183+ << " CreateBQClient:: Exported Windows certs to="
184+ << pem_path;
185+ options.set <google::cloud::CARootsFilePathOption>(pem_path);
172186 } else {
173187 if (!pem_file.empty ()) {
174188 options.set <google::cloud::CARootsFilePathOption>(pem_file);
175189 }
176190 }
177191#else
178192 // NON-WINDOWS (Linux, Mac): UseSystemTrustStore is ignored
179- if (!pem_file.empty ()) {
180- options.set <google::cloud::CARootsFilePathOption>(pem_file);
181- }
193+ if (!pem_file.empty ()) {
194+ LOG (INFO )
195+ << " CreateBQClient:: CARootsFilePathOption="
196+ << pem_file;
197+
198+ options.set <google::cloud::CARootsFilePathOption>(pem_file);
199+ }
182200#endif
183201
184202 // Set Proxy
@@ -278,6 +296,14 @@ StatusRecordOr<std::shared_ptr<ODBCBQClient>> ODBCBQClient::CreateBQClient(
278296 }
279297 std::string pem_path = *pem_path_or;
280298 ssl_opts.pem_root_certs = pem_path;
299+ LOG (INFO )
300+ << " CreateBQClient:: ssl_opts.pem_root_certs="
301+ << ssl_opts.pem_root_certs ;
302+
303+ LOG (INFO )
304+ << " CreateBQClient:: ssl_opts.pem_root_certs length="
305+ << ssl_opts.pem_root_certs .size ();
306+
281307 auto ssl_creds = grpc::SslCredentials (ssl_opts);
282308 read_options.set <google::cloud::GrpcCredentialOption>(ssl_creds);
283309 } else if (!pem_file.empty ()) {
@@ -300,6 +326,26 @@ LOG(INFO)
300326 << " GRPC_DNS_RESOLVER="
301327 << (resolver1 ? resolver1 : " <unset>" );
302328
329+ const char * resolver =
330+ std::getenv (" GRPC_DNS_RESOLVER" );
331+
332+ const char * grpc_roots =
333+ std::getenv (" GRPC_DEFAULT_SSL_ROOTS_FILE_PATH" );
334+
335+ LOG (INFO )
336+ << " CreateBQClient:: GRPC_DNS_RESOLVER="
337+ << (resolver ? resolver : " <unset>" );
338+
339+ LOG (INFO )
340+ << " CreateBQClient:: GRPC_DEFAULT_SSL_ROOTS_FILE_PATH="
341+ << (grpc_roots ? grpc_roots : " <unset>" );
342+
343+ LOG (INFO )
344+ << " CreateBQClient:: readapi_endpoint="
345+ << (readapi_endpoint.empty ()
346+ ? " bigquerystorage.googleapis.com"
347+ : readapi_endpoint);
348+
303349 BigQueryReadClient bigquery_read_client =
304350 BigQueryReadClient (MakeBigQueryReadConnection (read_options));
305351
0 commit comments