Introduce `debug` module style logging
voxpelli opened this issue ยท 3 comments
As a follow up to: #12
To make the debugging easier, I would suggest adopting either the debug
module in itself or at least the syntax of DEBUG=simple-update-notifier
/ DEBUG=*
to print out debug messages for failures here:
simple-update-notifier/src/index.ts
Lines 23 to 25 in a35efd0
I realize that the point of this module is to have a small dependency footprint, so maybe do not add the debug
module to do this.
I guess an alternative / simpler approach could also be to simply accept a debug: true
flag into simpleUpdateNotifier()
and do a console.error()
within the catch only when that flag is set to true
?
I think my preference would be for adding a flag like debug: true
as the original aim of the package was to not have many dependencies.
@alexbrazier Want a PR?
@alexbrazier Want a PR?
Sure, if you're happy to create one ๐