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 logging and messaging (Configurable log levels & passing useful errors back to the client) #100

Open
2 tasks
tammersaleh opened this issue Jan 20, 2022 · 2 comments
Labels
feature New feature

Comments

@tammersaleh
Copy link
Member

We're logging to two places Logger() and fmt.Printf() - are they going to the same place (stdout)? If so, why use two separate calls.

Also, many of our error messages are focused on the implementation ("Failed to initialize dohicky") instead of the impact ("Failed to connect to google.com").

  • standardize logging system
  • review error messages, rewriting them for the user's consumption.
@spkane
Copy link
Contributor

spkane commented Jan 20, 2022

This has been cleaned up a bit, and at the moment:

api.Logger() is used in the configureAPI() - Note: This is simply log.Printf()
log.Printf() is used elsewhere.
fmt.Print() style commands are only used in cludo client for STDOUT messages that are user facing.
CheckErr(err) is only used in cludo client for STDERR messages that result in the client exiting.

@spkane
Copy link
Contributor

spkane commented Jan 20, 2022

It would also be good to add log levels, so that message verbosity can be tuned for the audience.

@spkane spkane added the feature New feature label Feb 9, 2022
@spkane spkane changed the title Review logging and messaging Improve logging and messaging (Configurable log levels & passing useful errors back to the client) Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants