felixc / rexiv2

Rust library for read/write access to media-file metadata (Exif, XMP, and IPTC)
GNU General Public License v3.0
79 stars 17 forks source link

Add functions to add or set log level #37

Closed ghost closed 4 years ago

ghost commented 4 years ago

Tests run fine and I've confirmed with the same corrupted image from issue #36 that those WARNINGs don't show up after calling rexiv2::set_log_level(rexiv2::LogLevel::ERROR).

This PR re-exports gexiv2::GExiv2LogLevel as LogLevel; adds get_log_level() -> LogLevel to get the current log level, and set_log_level(level: gexiv2::LogLevel) to set the current log level.

ghost commented 4 years ago

I don't think I will for personal reasons, not that it's a major commit anyway! Thanks for haste by the way, this is a super helpful crate.

felixc commented 4 years ago

Merged in https://github.com/felixc/rexiv2/commit/1fadb5f37d248cec2640f20a33ac5a8bb208d62c — I rebased onto another change and I guess GitHub doesn't recognize that this has been merged, so this online PR will show as "closed", but the fix is safely landed :)

Thank you for contributing this!

It's included in release https://github.com/felixc/rexiv2/releases/tag/v0.9.0 and I'm about to upload to crates.io!