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 logging for elections #5826

Merged
merged 1 commit into from Nov 8, 2018
Merged

Add logging for elections #5826

merged 1 commit into from Nov 8, 2018

Conversation

baumanj
Copy link
Contributor

@baumanj baumanj commented Nov 7, 2018

Currently there is relatively little logging to help understand why an election isn't behaving as expected. This should provide enough detail at the debug level for understanding basic issues and even more at the trace level to help sort out unexpected membership problems.

Signed-off-by: Jon Bauman <5906042+baumanj@users.noreply.github.com>
@thesentinels
Copy link
Contributor

Thanks for the pull request! Here is what will happen next:

  1. Your PR will be reviewed by the maintainers
  2. If everything looks good, one of them will approve it, and your PR will be merged.

Thank you for contributing!

@raskchanky
Copy link
Contributor

One comment I have in general about debug logging is that tokio is so verbose and frequent with its logging that it has a tendency to drown out everything else at the debug log level.

@christophermaier
Copy link
Contributor

@raskchanky You can tweak the logging levels on a per-module basis, e.g.

RUST_LOG=info,rustc_metadata=error,cargo=error,jobserver=error,rustc_trans=error,rustc_driver=error,rustc_mir=error,rustc=error,tokio_core=info,habitat_sup::manager::service::dir=debug

This helps a lot.

See https://docs.rs/env_logger/0.5.13/env_logger/#enabling-logging for more.

Copy link
Contributor

@christophermaier christophermaier left a comment

Choose a reason for hiding this comment

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

A few suggestions / observations, but no blockers.

I really like this... it's like making code comments dynamically available at runtime :)

components/butterfly/src/server/mod.rs Show resolved Hide resolved
components/butterfly/src/server/mod.rs Show resolved Hide resolved
components/butterfly/src/server/mod.rs Show resolved Hide resolved
@baumanj baumanj merged commit c9821f4 into master Nov 8, 2018
@baumanj baumanj deleted the election-logging branch November 8, 2018 15:07
chef-ci added a commit that referenced this pull request Nov 8, 2018
Obvious fix; these changes are the result of automation not creative thinking.
@christophermaier christophermaier added Type:BugFixes PRs that fix an existing bug and removed X-fix labels Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:BugFixes PRs that fix an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants