kubo
kubo copied to clipboard
Switch to go-log v2
Checklist
- [X] My issue is specific & actionable.
- [X] I am not suggesting a protocol enhancement.
- [X] I have searched on the issue tracker for my issue.
Description
https://github.com/ipfs/go-log v2 has been out for quite a while now and go-libp2p v0.18.0 (the biggest source of go-log v1 outputs) is switching over to v2. We should too so that it can finally be deprecated.
This will also lead to the output of ipfs log tail becoming effectively useless which is largely happening anyway as a result of other components (e.g. go-libp2p) dropping support for go-log v1. This gives us an opportunity to make ipfs log tail more useful. For example, mirroring the daemon log output via ipfs log tail so it can be fetched over the HTTP API and doesn't have to track all log outputs just those from while the command is running.
cc @lidel @guseggert
:+1 for making /api/v0/log/tail useful over HTTP
My wishlist is short:
- ability to log/tail by level (DEBUG/INFO/WARN/ERROR)
- ability to log/tail by subsystem (
It will enable us to add log explorer with filtering per system in ipfs-webui / ipfs-desktop (cc @SgtPooki)
@aschmahmann : is this a good candidate for @schomatis ?
Sounds like it. Will go ahead with this one unless explicitly flagged otherwise.
Yep seems reasonable. We should probably use the go-log format (https://github.com/ipfs/go-log#golog_log_level) for describing particular subsystems to get logs for though.