Added option -q (quiet) to silence warnings and error messages from the Exiv2 library to the exiv2 command line tool.

v0.27.3
Andreas Huggel 15 years ago
parent dc264bc00d
commit c71e12b899

@ -3,7 +3,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH EXIV2 1 "Feb 14, 2010"
.TH EXIV2 1 "Sep 10, 2010"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -127,6 +127,11 @@ Show the program version and exit.
.B \-v
Be verbose during the program run.
.TP
.B \-q
Silence warnings and error messages from the Exiv2 library during the
program run (quiet). Note that options \fB\-v\fP and \fB\-q\fP can be
used at the same time.
.TP
.B \-b
Show large binary values (default is to suppress them).
.TP

@ -256,6 +256,7 @@ void Params::help(std::ostream& os) const
<< _(" -h Display this help and exit.\n")
<< _(" -V Show the program version and exit.\n")
<< _(" -v Be verbose during the program run.\n")
<< _(" -q Silence warnings and error messages during the program run (quiet).\n")
<< _(" -b Show large binary values.\n")
<< _(" -u Show unknown tags.\n")
<< _(" -g key Only output info for this key (grep).\n")
@ -336,6 +337,7 @@ int Params::option(int opt, const std::string& optarg, int optopt)
case 'h': help_ = true; break;
case 'V': version_ = true; break;
case 'v': verbose_ = true; break;
case 'q': Exiv2::LogMsg::setLevel(Exiv2::LogMsg::mute); break;
case 'k': preserve_ = true; break;
case 'b': binary_ = false; break;
case 'u': unknown_ = false; break;

@ -220,7 +220,7 @@ private:
@brief Default constructor. Note that optstring_ is initialized here.
The c'tor is private to force instantiation through instance().
*/
Params() : optstring_(":hVvfbuktTFa:Y:O:D:r:p:P:d:e:i:c:m:M:l:S:g:n:"),
Params() : optstring_(":hVvqfbuktTFa:Y:O:D:r:p:P:d:e:i:c:m:M:l:S:g:n:"),
help_(false),
version_(false),
verbose_(false),

@ -49,6 +49,7 @@ Options:
-h Display this help and exit.
-V Show the program version and exit.
-v Be verbose during the program run.
-q Silence warnings and error messages during the program run (quiet).
-b Show large binary values.
-u Show unknown tags.
-g key Only output info for this key (grep).

Loading…
Cancel
Save