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-level flag to inject-connect, healthchecks debug logs #400

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

lkysow
Copy link
Member

@lkysow lkysow commented Nov 20, 2020

Changes proposed in this PR:

  • Add -log-level flag to inject-connect so we can configure the health check log level
  • Add debug logs to health checks so we can see when it's setting a check status
  • Move logger construction to common so it can be reused

How I've tested this PR:

  • I haven't yet!

How I expect reviewers to test this PR:

  • code

Checklist:

  • Tests added
  • CHANGELOG entry added (HashiCorp engineers only, community PRs should not add a changelog entry)

@lkysow lkysow force-pushed the log-levels branch 2 times, most recently from 8eb103d to 14f0384 Compare November 20, 2020 21:21
Level: hclog.Info,
Output: os.Stderr,
})
logger := hclog.Default()
Copy link
Member Author

Choose a reason for hiding this comment

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

This is equivalent.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use the constructor here?

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean swap it back to hclog.New() or use `common.Logger("info")?

Copy link
Contributor

Choose a reason for hiding this comment

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

use common.Logger(hclog.Info) for consistency?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not a huge deal for me one way or the other btw.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea because we might add more to that function and expect it to apply to all loggers.

@lkysow lkysow requested review from kschoche, a team and ishustava and removed request for a team November 20, 2020 21:29
Copy link
Contributor

@kschoche kschoche left a comment

Choose a reason for hiding this comment

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

looks great!

Copy link
Contributor

@ishustava ishustava 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! Left a couple of comments, but they are not blocking.

subcommand/lifecycle-sidecar/command.go Show resolved Hide resolved
Level: hclog.Info,
Output: os.Stderr,
})
logger := hclog.Default()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use the constructor here?

Also standardize on how we construct logger throughout commands.
@lkysow lkysow merged commit 1518dcc into master Nov 23, 2020
@lkysow lkysow deleted the log-levels branch November 23, 2020 20:54
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.

None yet

3 participants