Skip to content

Commit

Permalink
Configure prisma logging after client init
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerHendrickson committed Dec 7, 2023
1 parent 632201d commit 2be2594
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions api/src/lib/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ async function createPrismaClient() {
datasourceUrl: datasourceUrl,
})
}
createPrismaClient()

handlePrismaLogging({
db,
logger,
logLevels: ['info', 'warn', 'error'],
createPrismaClient().then(() => {
handlePrismaLogging({
db,
logger,
logLevels: ['info', 'warn', 'error'],
})
})

0 comments on commit 2be2594

Please sign in to comment.