Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Add new rich error messages#150

Merged
cmoog merged 1 commit intomasterfromclog
Oct 21, 2020
Merged

Add new rich error messages#150

cmoog merged 1 commit intomasterfromclog
Oct 21, 2020

Conversation

cmoog
Copy link
Contributor

@cmoogcmoog commentedOct 21, 2020
edited
Loading

Inspired by thecargo message formatting.

Screen Shot 2020-10-21 at 1 08 31 PM

Screen Shot 2020-10-21 at 1 34 53 AM

Screen Shot 2020-10-21 at 1 13 48 PM

@cmoogcmoog marked this pull request as ready for reviewOctober 21, 2020 18:09
Copy link
Contributor

@coadlercoadler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks really good!

}

// LogInfo prints the given info message to stderr.
func LogInfo(header string, lines ...string) {
Copy link
Contributor

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

Copy link
ContributorAuthor

@cmoogcmoogOct 21, 2020
edited
Loading

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?

Copy link
Contributor

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
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@coadlercoadlercoadler approved these changes

@fuskovicfuskovicAwaiting requested review from fuskovic

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@cmoog@coadler

[8]ページ先頭

©2009-2025 Movatter.jp