Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug: Add DEBUG Timestamps #1914

Closed
maschad opened this issue Jul 31, 2023 · 3 comments
Closed

Debug: Add DEBUG Timestamps #1914

maschad opened this issue Jul 31, 2023 · 3 comments
Labels
good first issue Good issue for new contributors help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature

Comments

@maschad
Copy link
Member

maschad commented Jul 31, 2023

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 libp2p/js-libp2p-logger#33

@maschad maschad added need/triage Needs initial labeling and prioritization good first issue Good issue for new contributors help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature and removed need/triage Needs initial labeling and prioritization labels Jul 31, 2023
@tabcat
Copy link
Contributor

tabcat commented Jul 31, 2023

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

@maschad
Copy link
Member Author

maschad commented Jul 31, 2023

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.

@achingbrain
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good issue for new contributors help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature
Projects
Status: 🎉Done
Development

No branches or pull requests

3 participants