Skip to content

Commit

Permalink
fix query-with-params mode
Browse files Browse the repository at this point in the history
  • Loading branch information
berekuk committed Nov 25, 2024
1 parent 51264f0 commit fb61802
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/hub/src/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ function makePrisma() {
});

// FIXME - query-with-params mode causes duplicate log lines on code reloads.
(prisma as any).$on("query", async (e: any) => {
console.log(`${e.query} ${e.params}`);
});
if (config.logs === "query-with-params") {
(prisma as any).$on("query", async (e: any) => {
console.log(`${e.query} ${e.params}`);
});
}

return prisma;
}
Expand Down

0 comments on commit fb61802

Please sign in to comment.