diff options
| -rw-r--r-- | packages/db/index.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/db/index.ts b/packages/db/index.ts index fa46ca1f..4a0f473f 100644 --- a/packages/db/index.ts +++ b/packages/db/index.ts @@ -1,6 +1,11 @@ import { PrismaClient } from "@prisma/client"; -const prisma = new PrismaClient(); +const prisma = new PrismaClient({ + log: + process.env.NODE_ENV === "development" + ? ["query", "error", "warn"] + : ["error"], +}); // For some weird reason accessing @prisma/client from any package is causing problems (specially in error handling). // Re export them here instead. |
