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

Improve the log messages #339

Open
rafa-js opened this issue Aug 10, 2018 · 2 comments
Open

Improve the log messages #339

rafa-js opened this issue Aug 10, 2018 · 2 comments
Labels
improve-feature Improvements without breaking the interface roadmap on our roadmap

Comments

@rafa-js
Copy link

rafa-js commented Aug 10, 2018

What problem does this feature solve?

Provide more flexibility to the developer to display or hide the log messages. Sometimes is interesting look now the peer group is connecting to other peers or what messages is receiving, but sometimes not and it's quite overwhelming and difficult to find what you want in the console.

Describe what you've considered?

First of all a Logger class is required as a unique point in the app to send the log messages. This provides a lot of flexibility: easy to change from console to a file or any other place, and be able to change the way to manage the log messages in even in execution time by setting a few parameters.

Is very common have log messages with different priorities: verbose, warning, info, error. In my own opinion, this is fine and could be considered as a standard but still ambiguous: the developer considers what has the priority of info or warning.

You be nice to be able to filter this log messages by tags. For example: blockstore, peer, wallet... Different purposes with different tags, so I can set in the log class the tags of the purposes I want to get displayed.

Code sample / Spec

Sample to customize the log messages. All the tags could be enable by default:
Logger.showTags( tags: [LogTag.Blockstore, LogTag.Peers] )

Sample to send messages to the log:
Logger.log( message: "My blockstore message", tag: LogTag.Blockstore)

@usatie usatie added roadmap on our roadmap improve-feature Improvements without breaking the interface labels Aug 12, 2018
@usatie
Copy link
Collaborator

usatie commented Aug 12, 2018

@rseibane Thanks for creating an issue!
It's definitely useful so I put it on our roadmap!

@GitCash send 1000 bits to @rseibane

@GitCash
Copy link

GitCash commented Aug 12, 2018

Hey rseibane, user usatie tipped you 1000 bits in Bitcoin Cash ( ~ $0.574 ).

Click here to claim it!

You can also add the "thumbs down" reaction to usatie's comment above to prevent future tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improve-feature Improvements without breaking the interface roadmap on our roadmap
Projects
None yet
Development

No branches or pull requests

3 participants