Declaring a PrismaClient with conditional logging
Hi folks! I'm trying to instantiate a PrismaClient in a TypeScript project. I'm using v6.0.1, and have the following code:
Unfortunately, on the line where I set up the error logging, I get the following error:
I can fix that if I declare my array of
Unfortunately, on the line where I set up the error logging, I get the following error:
Argument of type '"error"' is not assignable to parameter of type 'never'.I can fix that if I declare my array of
LogDefinitions inline with the PrismaClient but I'd like to conditionally set up my log levels, which means I can't do everything inline. Is there a way around this?