Skip to content

Commit

Permalink
removed context for logging (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh authored May 26, 2021
1 parent 3b8e58c commit cac2a09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/whale/src/module.indexer/indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class Indexer {
await this.cleanup()
this.indexing = await this.synchronize()
} catch (err) {
this.logger.error('failed exceptionally', err, 'synchronize')
this.logger.error('failed exceptionally', err)
this.indexing = false
}
}
Expand Down Expand Up @@ -98,12 +98,12 @@ export class Indexer {
return
}

this.logger.log(`hash: ${status.hash} - height: ${status.height} - status: ${status.status}`, 'cleanup')
this.logger.log(`Cleanup - hash: ${status.hash} - height: ${status.height} - status: ${status.status}`)
await this.invalidate(status.hash, status.height)
}

private async index (hash: string, height: number): Promise<void> {
this.logger.log(`hash: ${hash} - height: ${height}`, 'index')
this.logger.log(`Index - hash: ${hash} - height: ${height}`)
await this.statusMapper.put(hash, height, Status.INDEXING)

try {
Expand All @@ -116,7 +116,7 @@ export class Indexer {
}

private async invalidate (hash: string, height: number): Promise<void> {
this.logger.log(`hash: ${hash} - height: ${height}`, 'invalidate')
this.logger.log(`Invalidate - hash: ${hash} - height: ${height}`)
await this.statusMapper.put(hash, height, Status.INVALIDATING)

try {
Expand Down

0 comments on commit cac2a09

Please sign in to comment.