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

adding logging and CMD line control of level of logging messages #9

Merged
merged 2 commits into from
Nov 21, 2022

Conversation

Dreycey
Copy link
Owner

@Dreycey Dreycey commented Nov 21, 2022

Adding logging functionality

  • Logging level can be set by cmd line (in README)
  • Updated README with how the log level can be set
  • Various print statements converted to different levels of logging

@Dreycey Dreycey requested a review from klinvill November 21, 2022 04:29
Copy link
Collaborator

@klinvill klinvill left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for adding logging

@@ -94,6 +94,11 @@ impl BloomTree<HashSeed, HashSeed> {
/// # Returns
/// - self, a BloomTree instance.
fn insert(mut self, genome: &file_parser::RecordTypes) -> Self {
log::info!(
"(bloom tree; insert()) inserting {} into the tree",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ideally we could just change the logging format to dynamically use the function name, but there's not currently a standardized macro to do this (rust-lang/rfcs#1743). So I'm good with this approach for now.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yeah wow it looks like the convo just died in 2019

@Dreycey Dreycey merged commit d36cc78 into main Nov 21, 2022
@Dreycey Dreycey deleted the dreycey/logging branch February 28, 2023 23:38
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.

2 participants