liblog: logcat: Add printable format modifier
- added printable format modifier:
logcat -v printable
- opencoded borrowed individual utf8 validity checking algorithm
from utf8_length() in libutils/Unicode.cpp
- if considered basic one-character ASCII, use popular \x escape
sequences for non-printable
- logprint convert to C comments to drop mixed-mode
Bug: 19000361
Change-Id: I122a5b8fb41216fc0bc816178c0b768f3df56586
diff --git a/logcat/logcat.cpp b/logcat/logcat.cpp
index 6d7740e..736e02e 100644
--- a/logcat/logcat.cpp
+++ b/logcat/logcat.cpp
@@ -253,7 +253,8 @@
" -r <kbytes> Rotate log every kbytes. Requires -f\n"
" -n <count> Sets max number of rotated logs to <count>, default 4\n"
" -v <format> Sets the log print format, where <format> is:\n\n"
- " brief color long process raw tag thread threadtime time usec\n\n"
+ " brief color long printable process raw tag thread\n"
+ " threadtime time usec\n\n"
" -D print dividers between each log buffer\n"
" -c clear (flush) the entire log and exit\n"
" -d dump the log and then exit (don't block)\n"