From 378f4745a27632f3bb26e7029fe55142001f3d47 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Tue, 12 Apr 2016 09:11:46 -0700 Subject: [PATCH] logcat: Adjust help to make it more meaningful It is not clear about the long option aliases, list them comma separate first for clarity. Squash lines of help content if possible. Lock to 3 indents, one for options, another for text on same line as options and another for next line or continuation. Bug: 28120456 Change-Id: I5331acde3ac0fd3b87f6699ba108f6cef46a1563 --- logcat/logcat.cpp | 87 +++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/logcat/logcat.cpp b/logcat/logcat.cpp index e65469aa2..04b096f0b 100644 --- a/logcat/logcat.cpp +++ b/logcat/logcat.cpp @@ -278,61 +278,58 @@ static void show_help(const char *cmd) fprintf(stderr,"Usage: %s [options] [filterspecs]\n", cmd); fprintf(stderr, "options include:\n" - " -s Set default filter to silent.\n" - " Like specifying filterspec '*:S'\n" - " -f Log to file. Default is stdout\n" - " --file=\n" - " -r Rotate log every kbytes. Requires -f\n" - " --rotate-kbytes=\n" - " -n Sets max number of rotated logs to , default 4\n" - " --rotate-count=\n" - " -v Sets the log print format, where is:\n" - " --format=\n" - " brief color epoch long monotonic printable process raw\n" - " tag thread threadtime time uid usec UTC year zone\n\n" - " -D print dividers between each log buffer\n" - " --dividers\n" - " -c clear (flush) the entire log and exit\n" - " --clear\n" - " -d dump the log and then exit (don't block)\n" - " -e only print lines where the log message matches \n" - " --regex where is a regular expression\n" - " -m quit after printing lines. This is meant to be\n" - " --max-count= paired with --regex, but will work on its own.\n" - " --print paired with --regex and --max-count to let content bypass\n" + " -s Set default filter to silent. Equivalent to filterspec '*:S'\n" + " -f , --file= Log to file. Default is stdout\n" + " -r , --rotate-kbytes=\n" + " Rotate log every kbytes. Requires -f option\n" + " -n , --rotate-count=\n" + " Sets max number of rotated logs to , default 4\n" + " -v , --format=\n" + " Sets the log print format, where is:\n" + " brief color epoch long monotonic printable process raw\n" + " tag thread threadtime time uid usec UTC year zone\n" + " -D, --dividers Print dividers between each log buffer\n" + " -c, --clear Clear (flush) the entire log and exit\n" + " -d Dump the log and then exit (don't block)\n" + " -e , --regex=\n" + " Only print lines where the log message matches \n" + " where is a regular expression\n" + // Leave --head undocumented as alias for -m + " -m , --max-count=\n" + " Quit after printing lines. This is meant to be\n" + " paired with --regex, but will work on its own.\n" + " --print Paired with --regex and --max-count to let content bypass\n" " regex filter but still stop at number of matches.\n" - " -t print only the most recent lines (implies -d)\n" - " -t '