diff mbox

[FFmpeg-devel] doc: update loglevel option documentation

Message ID 1522744235-15519-1-git-send-email-t.rapp@noa-archive.com
State Superseded
Headers show

Commit Message

Tobias Rapp April 3, 2018, 8:30 a.m. UTC
Updates documentation after the changes to loglevel flag prefix parsing
in 4b736bc921ed96ad6d312ce0cbe0de29b9e3fe81.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
---
 doc/fftools-common-opts.texi | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

Comments

Lou Logan April 5, 2018, 7:56 p.m. UTC | #1
On Tue, Apr 3, 2018, at 12:30 AM, Tobias Rapp wrote:
> Updates documentation after the changes to loglevel flag prefix parsing
> in 4b736bc921ed96ad6d312ce0cbe0de29b9e3fe81.
> 
> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
> ---
>  doc/fftools-common-opts.texi | 26 ++++++++++++++++++--------
>  1 file changed, 18 insertions(+), 8 deletions(-)
[..]
> +Flags can also be used alone by adding a '+'/'-' prefix to set/reset a
> +single flag without affecting other flags or changing the log level. When
> +setting both, flags and level, a '+' separator is expected between last
> +flag and before level.

Confusing. We have the  "-loglevel" option itself, the "level" flag to add the current loglevel prefix to the message line (I would have preferred if it were named "prefix"), the "loglevel" value, and we also use the generic phrase "log level" in the docs.

Also potentially confusing is that the "-/+" prefix is used to set/reset individual flags, but "+" is also used as the separator between flags and loglevel.

Your quoted paragraph above is unclear to me. Correct me if I'm wrong, but I'm thinking it should be worded something like:

Flags can also be used alone by adding a '+'/'-' prefix to set/reset a
single flag without affecting other @var{flags} or changing @var{loglevel}. When
setting both @var{flags} and @var{loglevel}, a '+' separator is expected between the last
@var{flags} value and before @var{loglevel}.

Lastly, an example utilizing all flags and loglevel will make usage much more clear for general users.
diff mbox

Patch

diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi
index 185ec21..d4ee19d 100644
--- a/doc/fftools-common-opts.texi
+++ b/doc/fftools-common-opts.texi
@@ -168,14 +168,24 @@  The returned list cannot be assumed to be always complete.
 ffmpeg -sinks pulse,server=192.168.0.4
 @end example
 
-@item -loglevel [repeat+]@var{loglevel} | -v [repeat+]@var{loglevel}
-Set the logging level used by the library.
-Adding "repeat+" indicates that repeated log output should not be compressed
-to the first line and the "Last message repeated n times" line will be
-omitted. "repeat" can also be used alone.
-If "repeat" is used alone, and with no prior loglevel set, the default
-loglevel will be used. If multiple loglevel parameters are given, using
-'repeat' will not change the loglevel.
+@item -loglevel [@var{flags}+]@var{loglevel} | -v [@var{flags}+]@var{loglevel}
+Set logging level and flags used by the library.
+
+The optional @var{flags} prefix can consist of the following values:
+@table @samp
+@item repeat
+Indicates that repeated log output should not be compressed to the first line
+and the "Last message repeated n times" line will be omitted.
+@item level
+Indicates that log output should add a @code{[level]} prefix to each message
+line. This can be used as an alternative to log coloring, e.g. when dumping the
+log to file.
+@end table
+Flags can also be used alone by adding a '+'/'-' prefix to set/reset a
+single flag without affecting other flags or changing the log level. When
+setting both, flags and level, a '+' separator is expected between last
+flag and before level.
+
 @var{loglevel} is a string or a number containing one of the following values:
 @table @samp
 @item quiet, -8