<@U18M96U5N> Thanks for demonstrating how prisma h...
# prisma-client
p
@tim2 Thanks for demonstrating how prisma handles the N+1 problem. It will be pretty useful to get some buy-in from my peers to switch to prisma. I'd like to do a little demo to them using our codebase to demonstrate the improvement. How did you get it to log your queries out? We currently using sequelize, which works on a environment variable. Does prisma have something similar?
✔️ 1
r
You can set the logs when you instantiate prisma:
Copy code
const prisma = new PrismaClient({
    errorFormat: 'minimal',
    log: ['query']
});
LogLevel = 'info' | 'query' | 'warn' | 'error'
but to keep it simple you can use:
Copy code
const prisma = new PrismaClient({
  log: ['query', 'info', 'warn'],
});
p
Thanks, that helps