ipfs / service-worker-gateway

[WIP EXPERIMENT] IPFS Gateway implemented in Service Worker
https://inbrowser.link
Other
23 stars 7 forks source link

fix: use separate logger for ui/sw #217

Closed SgtPooki closed 5 months ago

SgtPooki commented 5 months ago

Title

fix: use separate logger for ui/sw

Description

Fixes https://github.com/ipfs-shipyard/service-worker-gateway/issues/139

All logs now:

  1. include the host.
    • For UI: useful for redirect and config page where things are logged from iframe
    • For SW: useful for debugging different messages from service worker loaded on page in iframe vs main page.
  2. have a global prefix: helia:service-worker-gateway:
  3. have a distinct prefix.
    • For UI: helia:service-worker-gateway:ui
    • For SW: helia:service-worker-gateway:sw
  4. are injected into components that need them

Notes & open questions

On redirect page

filtering console logs by helia:service-worker-gateway:sw

image

filtering console logs by helia:service-worker-gateway:ui

image

Change checklist