logcat: Adjust help to make it more meaningful
(cherry pick from commit 378f4745a2
)
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
Bug: 28788401
Bug: 28813587
Change-Id: I5331acde3ac0fd3b87f6699ba108f6cef46a1563
This commit is contained in:
parent
ddf5451df0
commit
3f6777a3dd
|
@ -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 <filename> Log to file. Default is stdout\n"
|
||||
" --file=<filename>\n"
|
||||
" -r <kbytes> Rotate log every kbytes. Requires -f\n"
|
||||
" --rotate-kbytes=<kbytes>\n"
|
||||
" -n <count> Sets max number of rotated logs to <count>, default 4\n"
|
||||
" --rotate-count=<count>\n"
|
||||
" -v <format> Sets the log print format, where <format> is:\n"
|
||||
" --format=<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 <expr> only print lines where the log message matches <expr>\n"
|
||||
" --regex <expr> where <expr> is a regular expression\n"
|
||||
" -m <count> quit after printing <count> lines. This is meant to be\n"
|
||||
" --max-count=<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>, --file=<file> Log to file. Default is stdout\n"
|
||||
" -r <kbytes>, --rotate-kbytes=<kbytes>\n"
|
||||
" Rotate log every kbytes. Requires -f option\n"
|
||||
" -n <count>, --rotate-count=<count>\n"
|
||||
" Sets max number of rotated logs to <count>, default 4\n"
|
||||
" -v <format>, --format=<format>\n"
|
||||
" Sets the log print format, where <format> 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 <expr>, --regex=<expr>\n"
|
||||
" Only print lines where the log message matches <expr>\n"
|
||||
" where <expr> is a regular expression\n"
|
||||
// Leave --head undocumented as alias for -m
|
||||
" -m <count>, --max-count=<count>\n"
|
||||
" Quit after printing <count> 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 <count> print only the most recent <count> lines (implies -d)\n"
|
||||
" -t '<time>' print most recent lines since specified time (implies -d)\n"
|
||||
" -T <count> print only the most recent <count> lines (does not imply -d)\n"
|
||||
" -T '<time>' print most recent lines since specified time (not imply -d)\n"
|
||||
// Leave --tail undocumented as alias for -t
|
||||
" -t <count> Print only the most recent <count> lines (implies -d)\n"
|
||||
" -t '<time>' Print most recent lines since specified time (implies -d)\n"
|
||||
" -T <count> Print only the most recent <count> lines (does not imply -d)\n"
|
||||
" -T '<time>' Print most recent lines since specified time (not imply -d)\n"
|
||||
" count is pure numerical, time is 'MM-DD hh:mm:ss.mmm...'\n"
|
||||
" 'YYYY-MM-DD hh:mm:ss.mmm...' or 'sssss.mmm...' format\n"
|
||||
" -g get the size of the log's ring buffer and exit\n"
|
||||
" --buffer-size\n"
|
||||
" -G <size> set size of log ring buffer, may suffix with K or M.\n"
|
||||
" --buffer-size=<size>\n"
|
||||
" -L dump logs from prior to last reboot\n"
|
||||
" --last\n"
|
||||
" -g, --buffer-size Get the size of the ring buffer.\n"
|
||||
" -G <size>, --buffer-size=<size>\n"
|
||||
" Set size of log ring buffer, may suffix with K or M.\n"
|
||||
" -L, -last Dump logs from prior to last reboot\n"
|
||||
// Leave security (Device Owner only installations) and
|
||||
// kernel (userdebug and eng) buffers undocumented.
|
||||
" -b <buffer> Request alternate ring buffer, 'main', 'system', 'radio',\n"
|
||||
" --buffer=<buffer> 'events', 'crash', 'default' or 'all'. Multiple -b\n"
|
||||
" parameters are allowed and results are interleaved. The\n"
|
||||
" default is -b main -b system -b crash.\n"
|
||||
" -B output the log in binary.\n"
|
||||
" --binary\n"
|
||||
" -S output statistics.\n"
|
||||
" --statistics\n"
|
||||
" -p print prune white and ~black list. Service is specified as\n"
|
||||
" --prune UID, UID/PID or /PID. Weighed for quicker pruning if prefix\n"
|
||||
" -b <buffer>, --buffer=<buffer> Request alternate ring buffer, 'main',\n"
|
||||
" 'system', 'radio', 'events', 'crash', 'default' or 'all'.\n"
|
||||
" Multiple -b parameters are allowed. Buffers interleaved.\n"
|
||||
" Default -b main -b system -b crash.\n"
|
||||
" -B, --binary Output the log in binary.\n"
|
||||
" -S, --statistics Output statistics.\n"
|
||||
" -p, --prune Print prune white and ~black list. Service is specified as\n"
|
||||
" UID, UID/PID or /PID. Weighed for quicker pruning if prefix\n"
|
||||
" with ~, otherwise weighed for longevity if unadorned. All\n"
|
||||
" other pruning activity is oldest first. Special case ~!\n"
|
||||
" represents an automatic quicker pruning for the noisiest\n"
|
||||
" UID as determined by the current statistics.\n"
|
||||
" -P '<list> ...' set prune white and ~black list, using same format as\n"
|
||||
" --prune='<list> ...' printed above. Must be quoted.\n"
|
||||
" -P '<list> ...', --prune='<list> ...'\n"
|
||||
" Set prune white and ~black list, using same format as\n"
|
||||
" listed above. Must be quoted.\n"
|
||||
" --pid=<pid> Only prints logs from the given pid.\n"
|
||||
// Check ANDROID_LOG_WRAP_DEFAULT_TIMEOUT value
|
||||
// Check ANDROID_LOG_WRAP_DEFAULT_TIMEOUT value for match to 2 hours
|
||||
" --wrap Sleep for 2 hours or when buffer about to wrap whichever\n"
|
||||
" comes first. Improves efficiency of polling by providing\n"
|
||||
" an about-to-wrap wakeup.\n");
|
||||
|
|
Loading…
Reference in New Issue