-
Notifications
You must be signed in to change notification settings - Fork 314
Closed
Description
Many tools in the node ecosystem use https://www.npmjs.com/package/debug to make it easy for people to start debugging a certain library in their application.
I can for example do DEBUG='express:*' npm start
to get debug information on the express side of things in my app.
It would be neat to be able to do the same for postgres. DEBUG=postgres:* npm start
would report on all kinds of events happening during initialization and on queries.
I know I can set a debug callback already.
const debug = require('debug')('postgres:debug')
postgres(process.ENV.DATABASE_URL, {
debug: (...args) => debug(args)
})
That's what I'm doing currently.
Just trying to suggest a nice default for logging; and yes, my suggestion does add a dependency (downside?).
Metadata
Metadata
Assignees
Labels
No labels