Skip to content

Commit 2032aad

Browse files
committed
fix(store): align logger behavior
1 parent e916703 commit 2032aad

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/store/src/sqlite/nodejs.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ async function initDB(
2626
const dbPath = await getDBFilename(dbFilename);
2727
logger.debug('dbPath:', dbPath);
2828
return new Sqlite(dbPath, {
29-
verbose: verbose ? (...args) => logger.info(...args) : undefined,
29+
verbose: (verbose ? logger.info.bind(logger) : undefined) as
30+
| ((...args: unknown[]) => void)
31+
| undefined,
3032
});
3133
}
3234

packages/store/src/sqlite/wasm.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ describe('makeSQLKernelDatabase', () => {
313313
const consoleSpy = vi.spyOn(console, 'log');
314314
await makeSQLKernelDatabase({ verbose: true });
315315
expect(consoleSpy).toHaveBeenCalledWith(
316-
'[sqlite]',
316+
['[sqlite]'],
317317
'Initializing kernel store',
318318
);
319319
});

0 commit comments

Comments
 (0)