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

Add log gathering to debug command. #10609

Merged
merged 5 commits into from Dec 22, 2020
Merged

Conversation

ncabatoff
Copy link
Collaborator

No description provided.

@ncabatoff ncabatoff added this to the 1.6.2 milestone Dec 21, 2020
Copy link
Contributor

@raskchanky raskchanky left a comment

Choose a reason for hiding this comment

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

Looks good, just a few questions

@@ -981,3 +991,29 @@ func (c *DebugCommand) captureError(target string, err error) {
})
c.errLock.Unlock()
}

func (c *DebugCommand) writeLogs(ctx context.Context) error {
out, err := os.Create(filepath.Join(c.flagOutput, "vault.log"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to close out?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

D'oh, ty!

case <-ctx.Done():
return nil
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What causes this loop to terminate other than errors? I don't think the context will time out, will it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, the context passed in has a timeout.

@ncabatoff ncabatoff merged commit e2620b9 into master Dec 22, 2020
@ncabatoff ncabatoff deleted the vault-1206-debug-cmd-logs branch December 22, 2020 20:15
@ncabatoff ncabatoff modified the milestones: 1.6.2, 1.6.4 Apr 8, 2021
ncabatoff added a commit that referenced this pull request Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants