[CRIU] [PATCH 2/4] criu --help, Doc/criu.txt: fix -v option description

Kir Kolyshkin kir at openvz.org
Wed Jan 8 19:36:23 PST 2014


Current description of -v[vvv] was taken from criu-log.h comments
and describes specific log levels used by pr_* functions. The problem
is -vX includes all previous X-1, X-2... levels. Say, -vvvv description
says "debug only", while in fact it is not "only". Fix accordingly.

Also, removed -v0 description as it is useless. What -v0 in fact does is
it sets the log level to default -- same as if -vXXX is not used.

In addition, change a delimiter between option alternatives from comma
to a vertical bar in criu --help output, to be in line with the rest
of usage output.

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 Documentation/criu.txt | 13 ++++++++-----
 crtools.c              | 11 +++++------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/Documentation/criu.txt b/Documentation/criu.txt
index 295339a..764bf79 100644
--- a/Documentation/criu.txt
+++ b/Documentation/criu.txt
@@ -106,11 +106,14 @@ OPTIONS
 *-o*, *--log-file* 'file'::
     Write logging messages to 'file'.
 
-*-v* 'num'::
-    Set logging level to 'num'. Valid arguments are:
-        * *0* - (silent, error messages only);
-        * *1* - informative (default);
-        * *2* - debug messages.
+*-v*['num'|*v*...]::
+    Set logging level to 'num'. The higer the level, the more output
+    is produced. Either numeric values or multiple *v* can be used.
+    The following levels are available:
+        * *-v1*, *-v*    - only messages and errors;
+        * *-v2*, *-vv*   - also warnings (default level);
+        * *-v3*, *-vvv*  - also information messages;
+        * *-v4*, *-vvvv* - lots of debug.
 
 *--log-pid*::
     Write separate logging files per each pid.
diff --git a/crtools.c b/crtools.c
index ade755c..cbc34fe 100644
--- a/crtools.c
+++ b/crtools.c
@@ -436,12 +436,11 @@ usage:
 "* Logging:\n"
 "  -o|--log-file FILE    log file name\n"
 "     --log-pid          enable per-process logging to separate FILE.pid files\n"
-"  -v[NUM]               set logging level:\n"
-"                          -v0        - messages regardless of log level\n"
-"                          -v1, -v    - errors, when we are in trouble\n"
-"                          -v2, -vv   - warnings (default)\n"
-"                          -v3, -vvv  - informative, everything is fine\n"
-"                          -v4, -vvvv - debug only\n"
+"  -v[NUM]               set logging level (higher level means more output):\n"
+"                          -v1|-v    - only errors and messages\n"
+"                          -v2|-vv   - also warnings (default level)\n"
+"                          -v3|-vvv  - also information messages\n"
+"                          -v4|-vvvv - lots of debug\n"
 "\n"
 "* Memory dumping options:\n"
 "  --track-mem           turn on memory changes tracker in kernel\n"
-- 
1.8.1.4



More information about the CRIU mailing list