diff options
author | Mark Salyzyn <salyzyn@google.com> | 2015-05-15 09:01:58 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2015-06-04 08:37:14 -0700 |
commit | 5d332907f0f845227847c31a122578dc910f1072 (patch) | |
tree | 7efdf8e7f2b12c374e6f4daa2df9d45d5f986bfc /include | |
parent | b8216007c66a219de310830aaee05bf5a3d90466 (diff) | |
download | system_core-5d332907f0f845227847c31a122578dc910f1072.zip system_core-5d332907f0f845227847c31a122578dc910f1072.tar.gz system_core-5d332907f0f845227847c31a122578dc910f1072.tar.bz2 |
liblog: logcat: Add printable format modifier
(cherry pick from commit b932b2f8bac124b088edc93966281cca4567dc54)
- 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
Diffstat (limited to 'include')
-rw-r--r-- | include/log/logprint.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/log/logprint.h b/include/log/logprint.h index 96249e9..4b812cc 100644 --- a/include/log/logprint.h +++ b/include/log/logprint.h @@ -36,9 +36,10 @@ typedef enum { FORMAT_TIME, FORMAT_THREADTIME, FORMAT_LONG, - /* The following two are modifiers to above formats */ + /* The following three are modifiers to above formats */ FORMAT_MODIFIER_COLOR, /* converts priority to color */ FORMAT_MODIFIER_TIME_USEC, /* switches from msec to usec time precision */ + FORMAT_MODIFIER_PRINTABLE, /* converts non-printable to printable escapes */ } AndroidLogPrintFormat; typedef struct AndroidLogFormat_t AndroidLogFormat; |