diff --git a/app/lib/sqlite3Client.ts b/app/lib/sqlite3Client.ts index 3280d62..539f1c5 100644 --- a/app/lib/sqlite3Client.ts +++ b/app/lib/sqlite3Client.ts @@ -8,7 +8,10 @@ const databasePath = ? join(process.cwd(), "db", database.replace("file:", "")) : database.replace("file:", "") -const db = new Database(databasePath, { fileMustExist: true }) +const db = new Database(databasePath, { + fileMustExist: true, + verbose: (o) => console.log("\u001b[32mbetter-sqlite3:query\x1b[39m " + o), +}) const getProjectIdByPreparedStatement = db.prepare("SELECT id FROM Project WHERE basePath = ?") const getProjectIdBy = (basePath: string): number | null => { diff --git a/blitz.config.ts b/blitz.config.ts index 7866418..fecb14f 100644 --- a/blitz.config.ts +++ b/blitz.config.ts @@ -1,6 +1,9 @@ import { BlitzConfig, sessionMiddleware, simpleRolesIsAuthorized } from "blitz" const config: BlitzConfig = { + log: { + level: "warn", + }, middleware: [ sessionMiddleware({ cookiePrefix: "co-metub", diff --git a/db/index.ts b/db/index.ts index a63b57b..120b2df 100644 --- a/db/index.ts +++ b/db/index.ts @@ -4,4 +4,4 @@ import { PrismaClient } from "@prisma/client" const EnhancedPrisma = enhancePrisma(PrismaClient) export * from "@prisma/client" -export default new EnhancedPrisma() +export default new EnhancedPrisma({ log: ["query", "warn", "error"] })