summaryrefslogtreecommitdiffstats
path: root/logcat
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-09-16 19:42:53 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-16 19:42:53 +0000
commit0537416da52e1ec2da4b4c1bf1270893cddd6a60 (patch)
treef28e30d17768d692417b96a384f1a568361d543d /logcat
parent01401bbc37fd208ddd223a830b79391c05183b42 (diff)
parenta9d789dd8a7c1cfe58793d77af80bb457fca3cf2 (diff)
downloadcore-0537416da52e1ec2da4b4c1bf1270893cddd6a60.tar.gz
core-0537416da52e1ec2da4b4c1bf1270893cddd6a60.tar.bz2
core-0537416da52e1ec2da4b4c1bf1270893cddd6a60.zip
am a9d789dd: am a3e53f1d: Merge "logcat: -v format defaults to threadtime"
* commit 'a9d789dd8a7c1cfe58793d77af80bb457fca3cf2': logcat: -v format defaults to threadtime
Diffstat (limited to 'logcat')
-rw-r--r--logcat/logcat.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/logcat/logcat.cpp b/logcat/logcat.cpp
index fecbdb762..b557011f7 100644
--- a/logcat/logcat.cpp
+++ b/logcat/logcat.cpp
@@ -259,7 +259,7 @@ static void show_help(const char *cmd)
"\nIf not specified on the commandline, filterspec is set from ANDROID_LOG_TAGS.\n"
"If no filterspec is found, filter defaults to '*:I'\n"
"\nIf not specified with -v, format is set from ANDROID_PRINTF_LOG\n"
- "or defaults to \"brief\"\n\n");
+ "or defaults to \"threadtime\"\n\n");
@@ -543,7 +543,9 @@ int main(int argc, char **argv)
exit(-1);
}
- hasSetLogFormat = 1;
+ if (strcmp("color", optarg)) { // exception for modifiers
+ hasSetLogFormat = 1;
+ }
break;
case 'Q':
@@ -653,11 +655,12 @@ int main(int argc, char **argv)
if (logFormat != NULL) {
err = setLogFormat(logFormat);
-
if (err < 0) {
fprintf(stderr, "invalid format in ANDROID_PRINTF_LOG '%s'\n",
logFormat);
}
+ } else {
+ setLogFormat("threadtime");
}
}