node-mssql
node-mssql copied to clipboard
RFC - Remove `debug` dependency from production
We currently have debug
as a prod dependency as calls to it are scattered through our code. This isn't great.
We should have a reporter function we call that the consumer can hook into, this could be debug
or it could be any other kind of logger.
The beauty of using the debug library is that you can switch it on and off via EV/app setting, and as it's likely shared across various other dependencies in the Node ecosystem, you can tweak visibility of messages to the library.
So I'm in favour of the reporter function that's configurable but would like to see debug remain as a default should none be configured.
Debug is useful for troubleshooting MSSQL connectivity problems in a production environment. (DEBUG=mssql:*,tedious:* node server.js
) I also would like to see it kept as the configured default.
The idea wouldn't be to remove calls to a logger, but more for that to be a logger that can be defined by the consumer rather than by this library.