Skip to content

Log errors from HotROD servers#769

Merged
yurishkuro merged 1 commit intomasterfrom
log-hotrod-errors
Apr 10, 2018
Merged

Log errors from HotROD servers#769
yurishkuro merged 1 commit intomasterfrom
log-hotrod-errors

Conversation

@yurishkuro
Copy link
Copy Markdown
Member

Signed-off-by: Yuri Shkuro ys@uber.com

Signed-off-by: Yuri Shkuro <ys@uber.com>
@ghost ghost assigned yurishkuro Apr 10, 2018
@ghost ghost added the review label Apr 10, 2018
jAgentHostPort,
)
return server.Run()
return logError(zapLogger, server.Run())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it worth logging here and returning the same error? Will this lead to duplicate logs up the call stack? Maybe wrapping within another error makes more sense.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it does lead to dup logs, but that's better than not getting logs at all, which would be the case since the all command calls all servers except frontend via go ..., so returned errors go nowhere.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Right. I meant we could improve the code to wrap the errors each time, but this is all sample code so I don't really mind.

Copy link
Copy Markdown
Contributor

@isaachier isaachier left a comment

Choose a reason for hiding this comment

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

LGTM

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 218e93f on log-hotrod-errors into 1ae65e0 on master.

@yurishkuro yurishkuro merged commit 24fe987 into master Apr 10, 2018
@ghost ghost removed the review label Apr 10, 2018
@yurishkuro yurishkuro deleted the log-hotrod-errors branch April 10, 2018 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants