js-libp2p
js-libp2p copied to clipboard
Debug: Add DEBUG Timestamps
Would like to have the option to prepend [YYYY/MM/DD - HH:mm:ss] to all debug output lines by passing in an environment variable timestamps=true to enable them or by setting this in localstorage
Originally https://github.com/libp2p/js-libp2p-logger/issues/33
It looks like this is already available in debug https://github.com/debug-js/debug#environment-variables. Although the date format is slightly different.
That's why I had opened this issue, it's actually been discussed on debug-js but there is still an ongoing discussion on how to format output, but this exact format is desired for our library.
Closing as this is configurable via env vars as pointed out above and any extra work would not be carried out in this repo.