Skip to content

Commit 22cda92

Browse files
committed
A bit more tweaking on assets debug output
1 parent b641ab2 commit 22cda92

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/AssetCache.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ class AssetCache {
256256

257257
this.ensureDir();
258258

259-
debugAssets("[@11ty/eleventy-fetch] Writing to disk cache from %o", this.source);
259+
debugAssets("[11ty/eleventy-fetch] Writing %o from %o", contentPath, this.source);
260260

261261
// the contents must exist before the cache metadata are saved below
262262
fs.writeFileSync(contentPath, contents);
@@ -271,11 +271,11 @@ class AssetCache {
271271
debug(`Fetching from cache ${contentPath}`);
272272

273273
if (type === "json" || type === "parsed-xml") {
274-
debugAssets("Reading from require('%o')", contentPath);
274+
debugAssets("[11ty/eleventy-fetch] Reading require('%o')", contentPath);
275275
return require(contentPath);
276276
}
277277

278-
debugAssets("Reading from: %o", contentPath);
278+
debugAssets("[11ty/eleventy-fetch] Reading %o", contentPath);
279279
return fs.readFileSync(contentPath, type !== "buffer" ? "utf8" : null);
280280
}
281281

src/RemoteAssetCache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class RemoteAssetCache extends AssetCache {
165165

166166
this.fetchCount++;
167167

168-
debugAssets("[@11ty/eleventy-fetch] Fetching: %o", this.source);
168+
debugAssets("[11ty/eleventy-fetch] Fetching %o", this.source);
169169

170170
// v5: now using global (Node-native or otherwise) fetch instead of node-fetch
171171
let response = await fetch(this.source, fetchOptions);

0 commit comments

Comments
 (0)