MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / setLogLevel

Method setLogLevel

app/exiv2.cpp:473–498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471} // Params::option
472
473int Params::setLogLevel(const std::string& optArg) {
474 int rc = 0;
475 const auto logLevel = static_cast<char>(tolower(optArg[0]));
476 switch (logLevel) {
477 case 'd':
478 Exiv2::LogMsg::setLevel(Exiv2::LogMsg::debug);
479 break;
480 case 'i':
481 Exiv2::LogMsg::setLevel(Exiv2::LogMsg::info);
482 break;
483 case 'w':
484 Exiv2::LogMsg::setLevel(Exiv2::LogMsg::warn);
485 break;
486 case 'e':
487 Exiv2::LogMsg::setLevel(Exiv2::LogMsg::error);
488 break;
489 case 'm':
490 Exiv2::LogMsg::setLevel(Exiv2::LogMsg::mute);
491 break;
492 default:
493 std::cerr << progname() << ": " << _("Option") << " -Q: " << _("Invalid argument") << " \"" << optArg << "\"\n";
494 rc = 1;
495 break;
496 }
497 return rc;
498} // Params::setLogLevel
499
500int Params::evalGrep(const std::string& optArg) {
501 // check that string ends in "/i"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected