Skip to content

Commit

Permalink
added more verbose logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tat2bu committed Aug 24, 2023
1 parent 2d8f67e commit 7dee070
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/erc721sales.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class Erc721SalesService extends BaseService {
const transaction = await this.provider.getTransaction(transactionHash);
const block = await this.provider.getBlock(transaction.blockNumber)
const transactionDate = block.date.toISOString()
logger.info(`handling ${transactionHash} token ${tokenId} log ${tx.index}${transactionDate}`)
logger.info(`handling ${transactionHash} token ${tokenId} log ${tx.index}${transactionDate} - from ${tx.blockNumber}`)

const { value } = transaction;
let ether = ethers.formatEther(value.toString());
Expand Down
2 changes: 1 addition & 1 deletion src/logging.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function createLogger(service:string) {
winston.format.timestamp({
format: 'YYYY-MM-DD HH:mm:ss'
}),
winston.format.printf(info => `${info.timestamp} ${info.level}: ${info.message}`+(info.splat!==undefined?`${info.splat}`:" "))
winston.format.printf(info => `[${info.timestamp}] [${info.service}] [${info.level}]: ${info.message}`+(info.splat!==undefined?`${info.splat}`:" "))
),
defaultMeta: { service },
transports: [
Expand Down

0 comments on commit 7dee070

Please sign in to comment.