Expose a logger interface #2204
Labels
kind/improvement
An improvement to existing feature and code.
tech/typescript
Issue for tech TypeScript.
Milestone
Problem
Currently there are a lot of
console.error
calls in theNodeEngine
and prisma client. This is problematic since it will not forward those logs to the proper transports.Solution
It would be better off to have a general logging interface with a default implementation to
console
that users can override to provider their own logger like winston.Alternatives
Collect logs from STDOUT and send them.
EDIT1:
Another alternative is to use the
.on
method ad explained here: https://github.com/prisma/specs/tree/master/prisma-client-js#loggingThe text was updated successfully, but these errors were encountered: