You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Printing to stdout can hinder for example usage of lopdf in command line utilities. For example when someone create program to print number of pages to stdout and then want to use it in bash script (or as input to other CLI program) which will do something with that number pulled from stdout. This would hardly work for pdf files that triggers some lopdf warning.
It also looks nicer in code println!("Warning: {}", err) -> warn!("{}", err)
Or at least print to stderr using eprintln! or use conditional compilation and add feature to turn off printing to stdout.
The text was updated successfully, but these errors were encountered:
This would be more robust. Output can be controlled by users of lopdf crate or by users of crates which use lopdf.
https://crates.io/crates/log
There are nice println!-like macros:
Printing to stdout can hinder for example usage of lopdf in command line utilities. For example when someone create program to print number of pages to stdout and then want to use it in bash script (or as input to other CLI program) which will do something with that number pulled from stdout. This would hardly work for pdf files that triggers some lopdf warning.
It also looks nicer in code
println!("Warning: {}", err)
->warn!("{}", err)
Or at least print to stderr using eprintln! or use conditional compilation and add feature to turn off printing to stdout.
The text was updated successfully, but these errors were encountered: