Skip to content

Commit

Permalink
fix: Updated logging in the client pool and client factory to log inf…
Browse files Browse the repository at this point in the history
…ormation about the required transport and actual transport used. (#1853)
  • Loading branch information
MarkDuckworth authored May 30, 2023
1 parent 3dd53cf commit fe03d02
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion dev/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,12 @@ export class Firestore implements firestore.Firestore {
);
}

logger('Firestore', null, 'Initialized Firestore GAPIC Client');
logger(
'clientFactory',
null,
'Initialized Firestore GAPIC Client (useFallback: %s)',
useFallback
);
return client;
},
/* clientDestructor= */ client => client.close()
Expand Down
7 changes: 6 additions & 1 deletion dev/src/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,12 @@ export class ClientPool<T> {
this.concurrentOperationLimit - selectedClientRequestCount
);
} else {
logger('ClientPool.acquire', requestTag, 'Creating a new client');
logger(
'ClientPool.acquire',
requestTag,
'Creating a new client (requiresGrpc: %s)',
requiresGrpc
);
selectedClient = this.clientFactory(requiresGrpc);
selectedClientRequestCount = 0;
assert(
Expand Down

0 comments on commit fe03d02

Please sign in to comment.