diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-09-16 09:15:15 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2014-09-16 09:27:37 -0700 |
commit | 649fc605f8094c06a38251466ccb15a722e8a91f (patch) | |
tree | d8763ef8989d3192b14482bb5c0546de83c6f26c /logcat | |
parent | 17077a287c2260a35ea99e19b0308e479edc6cbb (diff) | |
download | core-649fc605f8094c06a38251466ccb15a722e8a91f.tar.gz core-649fc605f8094c06a38251466ccb15a722e8a91f.tar.bz2 core-649fc605f8094c06a38251466ccb15a722e8a91f.zip |
logcat: -v format defaults to threadtime
Change-Id: Iafddf83b0507a667e0395d38ec9afaed67319018
Diffstat (limited to 'logcat')
-rw-r--r-- | logcat/logcat.cpp | 9 |
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"); } } |