Use a Kysely logger to log SQL regardless of the adapter used

This commit is contained in:
Alex Gleason
2024-05-08 12:56:42 -05:00
parent dbe22b9710
commit 43e8f2a698
5 changed files with 23 additions and 26 deletions

View File

@@ -3,6 +3,7 @@ import { Kysely, sql } from 'kysely';
import { Conf } from '@/config.ts';
import { DittoTables } from '@/db/DittoTables.ts';
import { KyselyLogger } from '@/db/KyselyLogger.ts';
import SqliteWorker from '@/workers/sqlite.ts';
export class DittoSQLite {
@@ -17,6 +18,7 @@ export class DittoSQLite {
dialect: new PolySqliteDialect({
database: sqliteWorker,
}),
log: KyselyLogger,
});
// Set PRAGMA values.