diff options
author | Mark Salyzyn <salyzyn@google.com> | 2015-05-06 08:40:40 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2015-05-13 09:22:51 -0700 |
commit | 79c3815ca191033bd97e7d4458970b606f661a18 (patch) | |
tree | 85587a97dbbd8fe013534d4b85ff6180f2d5c075 /logcat | |
parent | a1aacb71f387c91d5fe383b8aaa5b0be2ec9cd3c (diff) | |
download | system_core-79c3815ca191033bd97e7d4458970b606f661a18.zip system_core-79c3815ca191033bd97e7d4458970b606f661a18.tar.gz system_core-79c3815ca191033bd97e7d4458970b606f661a18.tar.bz2 |
logcat: liblog: Add "usec" format argument
(cherry pick from commit e1f2004ecc05ce2d5d4313d16c7791594643f2ef)
- Add additional 3 digits of time precision for time output
adding in the reporting of usec
- Remove trailing space in header file
Change-Id: Ifb560850b8e01080e126fbaeab640db71cce3eea
Diffstat (limited to 'logcat')
-rw-r--r-- | logcat/logcat.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/logcat/logcat.cpp b/logcat/logcat.cpp index 2b19b93..2c2d785 100644 --- a/logcat/logcat.cpp +++ b/logcat/logcat.cpp @@ -235,7 +235,7 @@ static void show_help(const char *cmd) " -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\n\n" + " brief color long process raw tag thread 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" @@ -291,9 +291,7 @@ static int setLogFormat(const char * formatString) return -1; } - android_log_setPrintFormat(g_logformat, format); - - return 0; + return android_log_setPrintFormat(g_logformat, format); } static const char multipliers[][2] = { @@ -569,10 +567,7 @@ int main(int argc, char **argv) if (err < 0) { logcat_panic(true, "Invalid parameter %s to -v\n", optarg); } - - if (strcmp("color", optarg)) { // exception for modifiers - hasSetLogFormat = 1; - } + hasSetLogFormat |= err; break; case 'Q': |