js-libp2p icon indicating copy to clipboard operation
js-libp2p copied to clipboard

Debug: Add DEBUG Timestamps

Open maschad opened this issue 2 years ago • 2 comments

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

maschad avatar Jul 31 '23 17:07 maschad

It looks like this is already available in debug https://github.com/debug-js/debug#environment-variables. Although the date format is slightly different.

tabcat avatar Jul 31 '23 19:07 tabcat

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.

maschad avatar Jul 31 '23 22:07 maschad

Closing as this is configurable via env vars as pointed out above and any extra work would not be carried out in this repo.

achingbrain avatar May 14 '24 10:05 achingbrain