add logging (#187)

This commit is contained in:
KM Koushik
2025-07-26 20:05:34 +10:00
committed by GitHub
parent 5612d7a3eb
commit 202fbeacb6
24 changed files with 490 additions and 134 deletions

View File

@@ -1,8 +1,9 @@
import { PrismaClient } from "@prisma/client";
import { env } from "~/env";
import { logger } from "./logger/log";
const createPrismaClient = () => {
console.log("Creating Prisma client");
logger.info("Creating Prisma client");
const client = new PrismaClient({
log:
env.NODE_ENV === "development" ? ["query", "error", "warn"] : ["error"],