kwilteam / kwil-db

Kwil DB, the database for web3
https://www.kwil.com/
Other
30 stars 10 forks source link

cometbft logger often reports the wrong caller #242

Closed jchappelow closed 1 year ago

jchappelow commented 1 year ago

By virtue of log.WithOptions(zap.AddCallerSkip(1)), we generally get the correct caller in the call stack, but for some reason the cometbft logs often report the wrong caller e.g.

{"level":"info","ts":1693413459.9544282,"caller":"runtime/asm_amd64.s:1650","msg":"Reconnecting to peer","module":"p2p","addr":"658ea486c3fecf0e6869ad5fc632dd17fc35691a@127.0.0.1:26756"}

I haven't looked at why that might be the case.

brennanjl commented 1 year ago

Curious, should we include caller? I've always thought it felt weird from the perspective of a node operator. I have no strong opinion, just thought I'd bring it up.

Regardless, is there a way for us to turn it off in the CometBFT logger?

jchappelow commented 1 year ago

Curious, should we include caller? I've always thought it felt weird from the perspective of a node operator. I have no strong opinion, just thought I'd bring it up.

@Yaiba likes it. I'm ambivalent. Let's try to turn it off for comet code.

jchappelow commented 1 year ago

Oh well I see the problem with the log wrapper. Just fixing it now.