-
Notifications
You must be signed in to change notification settings - Fork 16
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
chore: Improve Tool's Output for Better User Visibility and unify CLI output library #284
Conversation
f5288bd
to
7ff21ee
Compare
I think using a logger for a CLI user interface is a little unusual. I believe the more common approach is abstracting code that prints stuff into some type of project "formatter" where the |
Hey @doanac! 😊
Ah, you got a point! We've got logrus in the mix already, so I figured, why not stick to the beat? But hey, I’m totally vibing with the fmt.Print idea. It’s neat and cuts down on the extra baggage – cool beans! I’ll spin that record and make the tweaks when I catch a free moment. Thanks a bunch! 🚀 |
7ff21ee
to
264d6df
Compare
Firstly, thank you for your valuable insights regarding this small suggestion. Regarding the use of Using On the other hand, logrus appears to be adept at navigating these scenarios, opting to simply output The driving force behind this proposal was to enact a low-effort/good first issue that could provide tangible value to our users. With the volume of notifications we produce, errors and warnings could easily go unnoticed. Given our ongoing use of logrus, it felt like a logical step to further embed it, ensuring greater code consistency. However, if logrus doesn't align with the team's vision, especially when weighing the challenges associated with For now, I'll be closing this. However, if you have alternative strategies in mind or believe there's a more effective approach worth exploring, please don't hesitate to reach out. I'm always here to assist and collaborate |
I've revisited this issue and observed that we're also utilizing the "github.com/fatih/color" package in certain areas. Given that we're already leveraging this package elsewhere, can we consider employing it for displaying errors in red and warnings in yellow? It would be beneficial to maintain consistent behavior across the tool. What are your thoughts on this? See: fioctl/subcommands/keys/tuf_updates_review.go Lines 93 to 97 in 0ac0f5f
|
264d6df
to
c7d623c
Compare
Signed-off-by: Camila Macedo <[email protected]>
c7d623c
to
b775791
Compare
@camilamacedo86 let's table this, please. I know that this change was done by some sort of If I were a user, I'd like only the But, I feel like I'm starting a discussion by this sentence; and I don't want a new round of debates. |
Description
Ensuring that users can swiftly identify critical warnings and errors is important for a smooth user experience. This PR focuses on making these critical messages stand out amidst the standard output of our tool. Specifically, the changes introduced are:
Example: