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
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 @@
" -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 @@
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 @@
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':