Log Transports

Is it possible to set up transports for Prisma Client logs? Context: I want to push logs to Grafana Loki using its HTTP endpoint. Here's an example of Pino logger doing it: https://www.npmjs.com/package/pino-loki If it's not possible directly, is this something Client Extensions could do?
npm
pino-loki
A transport for pino that sends messages to Loki. Latest version: 2.3.0, last published: 2 months ago. Start using pino-loki in your project by running npm i pino-loki. There are 15 other projects in the npm registry using pino-loki.
2 Replies
Sabin Adams
Sabin Adams2mo ago
I may have answered my own question. Appears I can use Event-Based logging to access the log and use my own logger: https://www.prisma.io/docs/orm/prisma-client/observability-and-logging/logging#event-based-logging
Logging | Prisma Documentation
Learn how to configure Prisma Client to log the raw SQL queries it sends to the database and other information.
Nurul
Nurul2mo ago
Hey Sabin 👋 I am glad to see you here! 😄 Hope you are doing great! Looks you are all sorted here 👍
Want results from more Discord servers?
Add your server