Skip to content

Commit

Permalink
chore(grpc-client): improved logging for grpc-client to include metho…
Browse files Browse the repository at this point in the history
…dName
  • Loading branch information
Arun-KumarH committed Jul 20, 2022
1 parent fe85d84 commit 350e7dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/grpc-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class GrpcClient {
options,
(err, value) => {
if (err) {
this.logger.error('Error serving unary request', { code: err.code, message: err.message, stack: err.stack });
this.logger.error('Error serving unary request', { code: err.code, message: err.message, stack: err.stack, method: methodPath });
return resolve({
operationStatus: {
code: err.code,
Expand Down Expand Up @@ -330,7 +330,7 @@ export class GrpcClient {
options,
(err, value) => {
if (err) {
this.logger.error('Error client stream request', { code: err.code, message: err.message, stack: err.stack });
this.logger.error('Error client stream request', { code: err.code, message: err.message, stack: err.stack, method: methodPath });
return resolve({
operationStatus: {
code: err.code,
Expand All @@ -343,7 +343,7 @@ export class GrpcClient {
}
);
(data as Stream).on('error', (err) => {
this.logger.error('Error on client streaming', { code: err.code, message: err.message, stack: err.stack });
this.logger.error('Error on client streaming', { code: err.code, message: err.message, stack: err.stack, method: methodPath });
});
(data as Stream).on('data', (data) => {
clientStream.write(data);
Expand Down Expand Up @@ -378,7 +378,7 @@ export class GrpcClient {
options,
(err, value) => {
if (err) {
this.logger.error('Error client stream request', { code: err.code, message: err.message, stack: err.stack });
this.logger.error('Error client stream request', { code: err.code, message: err.message, stack: err.stack, method: methodPath });
return resolve({
operationStatus: {
code: err.code,
Expand Down

0 comments on commit 350e7dc

Please sign in to comment.