Skip to content

Commit

Permalink
fix(API): fix logger (#919)
Browse files Browse the repository at this point in the history
References: #901 (review)
  • Loading branch information
krobi64 authored Dec 13, 2018
1 parent 39ffa1f commit f7e76f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/API/HealthController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ export class HealthController {
}

private async getTransactionRetryInfo(): Promise<TransactionAnchorRetryInfo> {
this.logger.child({ message: 'getTransactionRetryInfo' })
this.logger.trace('retrieving TransactionAnchorRetryInfo')
const logger = this.logger.child({ method: 'getTransactionRetryInfo' })
logger.trace('retrieving TransactionAnchorRetryInfo')
try {
const transactionAnchorRetryResults = await this.collection.findOne(
{
Expand All @@ -132,10 +132,10 @@ export class HealthController {
},
},
) || emptyTransactionAnchorRetryInfo
this.logger.trace({ transactionAnchorRetryResults }, 'getTransactionRetryInfo results')
logger.trace({ transactionAnchorRetryResults }, 'getTransactionRetryInfo results')
return transactionAnchorRetryResults.transactionAnchorRetryInfo
} catch (error) {
this.logger.error({ error }, 'error retrieving TransactionAnchorRetryInfo')
logger.error({ error }, 'error retrieving TransactionAnchorRetryInfo')
return []
}
}
Expand Down

0 comments on commit f7e76f1

Please sign in to comment.