Closed SgtPooki closed 1 month ago
You need to import enable
from @libp2p/logger
and not debug
.
Part of the point of wrapping debug
with @libp2p/logger
is that it allows us to swap out the underlying log implementation without having to change any calling code which is what happened in #2648 - calling through to the underlying implementation directly defeats the whole purpose.
using enable
from @libp2p/logger works, thanks
When attempting to use
@libp2p/logger
in the service-worker gateway, logs generated by the service worker were not being logged until I explicitly overrode the@libp2p/logger
'sforComponent
andprefixLogger
functions.see https://github.com/ipfs/service-worker-gateway/pull/395
Repro repo at https://github.com/SgtPooki/libp2p-logger-bug-repro