Skip to content

[META] Better log messages #78

@jeertmans

Description

@jeertmans

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomershacktoberfestIssue that is created for the Hacktoberfest event

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions