#476, #614: Introduced class LogMsg for enhanced logging, migrated all existing warnings and error messages (not the exceptions) to use the new logic. Every log message now has a type (debug, info, warning, error). Applications can set a logging level to determine which messages are processed and supply a custom log message handler at runtime. (Based on a contribution by Simson Garfinkel.)

This commit is contained in:
Andreas Huggel
2010-09-10 14:02:09 +00:00
parent 1fdf4a3ab5
commit dc264bc00d
19 changed files with 290 additions and 205 deletions
+2 -2
View File
@@ -106,7 +106,7 @@ namespace Exiv2 {
xmpPacket_ = xmpPacket;
if (xmpPacket_.size() > 0 && XmpParser::decode(xmpData_, xmpPacket_)) {
#ifndef SUPPRESS_WARNINGS
std::cerr << "Warning: Failed to decode XMP metadata.\n";
EXV_WARNING << "Failed to decode XMP metadata.\n";
#endif
}
copyXmpToIptc(xmpData_, iptcData_);
@@ -126,7 +126,7 @@ namespace Exiv2 {
if (XmpParser::encode(xmpPacket_, xmpData_,
XmpParser::omitPacketWrapper|XmpParser::useCompactFormat) > 1) {
#ifndef SUPPRESS_WARNINGS
std::cerr << "Error: Failed to encode XMP metadata.\n";
EXV_ERROR << "Failed to encode XMP metadata.\n";
#endif
}
}