node-mssql icon indicating copy to clipboard operation
node-mssql copied to clipboard

RFC - Remove `debug` dependency from production

Open dhensby opened this issue 5 years ago • 3 comments

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.

dhensby avatar Mar 25 '19 13:03 dhensby

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.

willmorgan avatar Apr 17 '19 22:04 willmorgan

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.

aklietz avatar Aug 03 '20 20:08 aklietz

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.

dhensby avatar Aug 03 '20 21:08 dhensby