diff --git a/src/workers/fetch.worker.ts b/src/workers/fetch.worker.ts index 4a67c6b8..d0cd1f44 100644 --- a/src/workers/fetch.worker.ts +++ b/src/workers/fetch.worker.ts @@ -13,10 +13,19 @@ export const FetchWorker = { init: Omit, signal: AbortSignal | null | undefined, ): Promise<[BodyInit, ResponseInit]> { - logi({ level: 'debug', ns: 'ditto.fetch', method: init.method ?? 'GET', url }); + logi({ level: 'debug', ns: 'ditto.fetch', state: 'started', method: init.method ?? 'GET', url }); const response = await safeFetch(url, { ...init, signal }); + logi({ + level: 'debug', + ns: 'ditto.fetch', + state: 'finished', + method: init.method ?? 'GET', + url, + status: response.status, + }); + return [ await response.arrayBuffer(), {