#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:
+2
-2
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user