diff options
author | Mark Salyzyn <salyzyn@google.com> | 2015-05-06 08:40:40 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2015-05-12 15:51:46 -0700 |
commit | e1f2004ecc05ce2d5d4313d16c7791594643f2ef (patch) | |
tree | aa898202892fa292279f5f82def5cd2eb3b96216 /logcat | |
parent | ae4d928d816e30dbe57c2c321b0f0759d0567b3f (diff) | |
download | core-e1f2004ecc05ce2d5d4313d16c7791594643f2ef.tar.gz core-e1f2004ecc05ce2d5d4313d16c7791594643f2ef.tar.bz2 core-e1f2004ecc05ce2d5d4313d16c7791594643f2ef.zip |
logcat: liblog: Add "usec" format argument
- 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 2b19b93b8..2c2d785ce 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': |