Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Bad log formatting in workers.go #35

Closed
karalabe opened this issue Dec 12, 2018 · 0 comments
Closed

Bad log formatting in workers.go #35

karalabe opened this issue Dec 12, 2018 · 0 comments

Comments

@karalabe
Copy link
Contributor

Just saw this in my IPFS logs:

16:07:31.315 DEBUG    bitswap: %!s(int=1)  keys in bitswap wantlist workers.go:188

Apparently you are using log.Debug(n, " keys in bitswap wantlist") to print this message (which btw is valid according to the interface), it's however not implemented correctly by go-logger, which uses %s as the format string for all parameters.

My initial idea was that this should be fixed in the logger, but changing it from %s to %v might have cascading adverse effects on the entire IPFS codebase, so maybe it's better to roll with the fault and maybe document the issue?

cc @whyrusleeping

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant