- Notifications
You must be signed in to change notification settings - Fork18
Add new rich error messages#150
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks really good!
Uh oh!
There was an error while loading.Please reload this page.
} | ||
// LogInfo prints the given info message to stderr. | ||
func LogInfo(header string, lines ...string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm a bit confused whyLogInfo
andLogSuccess
are the only ones prefixed withLog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yeah this is definitely confusing. The issue I'm having is thatError
,Warn
, andFatal
return errors. So it would potentially be even more confusing forInfo
andSuccess
to be the only ones with side-effects.
It gets pretty tricky when we actuallydo want to log errors as they happen: for example when iterating through a series ofstop
actions.
Any ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Ohh i see now, I was skimming over the returns. Considering the others return errors this makes more sense
- show rich log output for Info and Success logs- preserve rich CLI output for errors when possible
Uh oh!
There was an error while loading.Please reload this page.
Inspired by the
cargo
message formatting.