eliotstock / dro

Uniswap v3 dynamic range orders
0 stars 1 forks source link

Winston logs have 'undefined' on them as metadata #48

Closed eliotstock closed 2 years ago

eliotstock commented 2 years ago

My logs look like this:

2022-05-02T03:17:11.828Z [info] : Logger initialized undefined                                          │[1000] Unclaimed fees: 406.37 USD
2022-05-02T03:17:15.368Z [info] : DRO account: 0x1EE071ec8aD0768256Ab32c8bA61d99A39ef84a4 undefined     │05-02-03:09:40 #14695875 45.4 gwei 2,839.85 USDC
2022-05-02T03:17:16.226Z [info] : Chain: Optimism Mainnet undefined                                     │[1000] Unclaimed fees: 406.35 USD
2022-05-02T03:17:24.010Z [info] : Position NFT: https://app.uniswap.org/#/pool/91197 undefined          │05-02-03:11:48 #14695881 51.0 gwei 2,841.55 USDC
2022-05-02T03:17:27.600Z [info] : [360] Range: 2,751.79 <-> 2,852.65 undefined                          │[1000] Unclaimed fees: 407.32 USD
2022-05-02T03:17:28.540Z [info] : 05-02-03:17:28 #6901917 unknown 2,834.46 USDC undefined               │05-02-03:11:56 #14695882 57.2 gwei 2,837.86 USDC
2022-05-02T03:17:29.262Z [info] : [360] Unclaimed fees: 0.69 USD undefined 

Not sure what's going on here:

https://github.com/eliotstock/dro/blob/main/dro/src/logger.ts#L8

but metadata must be truthy and yet JSON.stringify()'s to 'undefined'.

msnelling commented 2 years ago

Yeah thats odd that metadata is returns as true. I'll see if I can dig out the bit of copypasta I found.