From 79c3815ca191033bd97e7d4458970b606f661a18 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Wed, 6 May 2015 08:40:40 -0700 Subject: 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 --- logcat/logcat.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'logcat') 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 Rotate log every kbytes. Requires -f\n" " -n Sets max number of rotated logs to , default 4\n" " -v Sets the log print format, where 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': -- cgit v1.2.3