[gthumb] suppress the warning messages when reading image matadata with exiv2



commit 17f4f3ec5ce88505286e291eb8a410f9209fff79
Author: Greg Mansfield <G Mansfield computer org>
Date:   Sat Nov 19 10:21:14 2011 +0100

    suppress the warning messages when reading image matadata with exiv2

 extensions/exiv2_tools/exiv2-utils.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/extensions/exiv2_tools/exiv2-utils.cpp b/extensions/exiv2_tools/exiv2-utils.cpp
index 31afa2a..0b1e47e 100644
--- a/extensions/exiv2_tools/exiv2-utils.cpp
+++ b/extensions/exiv2_tools/exiv2-utils.cpp
@@ -683,7 +683,8 @@ exiv2_read_metadata_from_file (GFile         *file,
 				*error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_FAILED, _("Invalid file format"));
 			return FALSE;
 		}
-
+		// Set the log level to only show errors (and suppress warnings, informational and debug messages)
+		Exiv2::LogMsg::setLevel(Exiv2::LogMsg::error);
 		exiv2_read_metadata (image, info);
 	}
 	catch (Exiv2::AnyError& e) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]