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

[META] Better log messages #78

Open
1 of 3 tasks
jeertmans opened this issue Sep 27, 2024 · 2 comments
Open
1 of 3 tasks

[META] Better log messages #78

jeertmans opened this issue Sep 27, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Issue that is created for the Hacktoberfest event

Comments

@jeertmans
Copy link
Owner

jeertmans commented Sep 27, 2024

Issues

  • Log messages are currently lacking some information, e.g.,
    trace!("This page does not contain any annotations, inserting an empty array");

    does not indicate the page id, which makes it harder to debug;
  • All messages (log and error) should end with a ".";
  • The following

    rpdf/src/cli/annotations.rs

    Lines 205 to 216 in 11da7a9

    let mut msg = String::from("Processing documents: ");
    self.files
    .iter()
    .enumerate()
    .for_each(|(document_number, file)| {
    msg.push_str(&format!("{file:?} (#{document_number})"));
    if document_number < self.files.len() - 1 {
    msg.push_str(", ");
    }
    });
    info!("{msg}");

    should probably use slice::join.

How to fix

Fixes are pretty easy, feel free to submit a pull request!

@jeertmans jeertmans added enhancement New feature or request good first issue Good for newcomers hacktoberfest Issue that is created for the Hacktoberfest event labels Sep 27, 2024
@Brijeshthummar02
Copy link
Contributor

hello there, @jeertmans i would work on this, assign me the task.

@jeertmans
Copy link
Owner Author

Hi @Brijeshthummar02! I am not assigning tasks because it will just refrain other people from contributing too.

This issue can be addressed with up to 3 different PRs, and I would be happy to review any contribution you might propose :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Issue that is created for the Hacktoberfest event
Projects
None yet
Development

No branches or pull requests

2 participants