Merge pull request #672 from jlssmt/logging

disabled query logging as default
This commit is contained in:
Daniel 2024-09-12 23:36:01 -04:00 committed by GitHub
commit f104fa095f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,7 @@ const globalForPrisma = global as unknown as { prisma: PrismaClient };
export const prisma =
globalForPrisma.prisma ||
new PrismaClient({
log: ["query"],
log: process.env.DEBUG === "true" ? ["query", "info", "warn", "error"] : ["warn", "error"]
});
if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;