Skip to content

Commit 3b8e9a3

Browse files
committed
saasCache, log - simplify logging for sassCache
1 parent bcbe901 commit 3b8e9a3

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎src/core/sass/cache.ts‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,18 +147,16 @@ class SassCache implements Cloneable<SassCache> {
147147
const registerCleanup = temp ? temp.onCleanup : onCleanup;
148148
const cachePath = this.path;
149149
registerCleanup(() => {
150-
log.debug(`SassCache cleanup EXECUTING for ${cachePath}`);
150+
log.debug(`SassCache cleanup executing for ${cachePath}`);
151151
try {
152152
this.kv.close();
153-
log.debug(`SassCache KV closed for ${cachePath}`);
154153
if (temp) safeRemoveIfExists(this.path);
155154
} catch (error) {
156155
log.info(
157156
`Error occurred during sass cache cleanup for ${this.path}: ${error}`,
158157
);
159158
}
160159
});
161-
log.debug(`SassCache cleanup REGISTERED for ${cachePath}`);
162160
}
163161
}
164162

@@ -203,16 +201,14 @@ export async function sassCache(
203201
temp: TempContext | undefined,
204202
): Promise<SassCache> {
205203
if (!_sassCache[path]) {
206-
log.debug(`Creating NEW SassCache at ${path}`);
204+
log.debug(`Creating SassCache at ${path}`);
207205
ensureDirSync(path);
208206
const kvFile = join(path, "sass.kv");
209207
const kv = await Deno.openKv(kvFile);
210208
await checkVersion(kv, kvFile);
211209
_sassCache[path] = new SassCache(kv, path);
212210
// register cleanup for this cache
213211
_sassCache[path].cleanup(temp);
214-
} else {
215-
log.debug(`Found EXISTING SassCache entry for ${path} (may be stale if KV was closed)`);
216212
}
217213
log.debug(`Returning SassCache at ${path}`);
218214
const result = _sassCache[path];

0 commit comments

Comments
 (0)