diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-04-07 14:58:08 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2014-04-16 15:38:50 -0700 |
commit | 99f47a9e7c4374f2bbfc18e4a97aa7848245ea33 (patch) | |
tree | d277c0e181a563c60703ffe8b7121c04e9ed57d2 /logcat | |
parent | 26bb9970c463eb1209803d833799f128484864ac (diff) | |
download | system_core-99f47a9e7c4374f2bbfc18e4a97aa7848245ea33.zip system_core-99f47a9e7c4374f2bbfc18e4a97aa7848245ea33.tar.gz system_core-99f47a9e7c4374f2bbfc18e4a97aa7848245ea33.tar.bz2 |
logd: liblog: logcat: debuggerd: Add LOG_ID_CRASH
Change-Id: Iea453764a1a4fc1661f461f10c641c30150e4d20
Diffstat (limited to 'logcat')
-rw-r--r-- | logcat/logcat.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/logcat/logcat.cpp b/logcat/logcat.cpp index ca97208..995a42e 100644 --- a/logcat/logcat.cpp +++ b/logcat/logcat.cpp @@ -227,8 +227,9 @@ static void show_help(const char *cmd) " -T <count> print only the most recent <count> lines (does not imply -d)\n" " -g get the size of the log's ring buffer and exit\n" " -b <buffer> Request alternate ring buffer, 'main', 'system', 'radio',\n" - " 'events' or 'all'. Multiple -b parameters are allowed and\n" - " results are interleaved. The default is -b main -b system.\n" + " 'events', 'crash' or 'all'. Multiple -b parameters are\n" + " allowed and results are interleaved. The default is\n" + " -b main -b system -b crash.\n" " -B output the log in binary.\n" " -S output statistics.\n" " -G <size> set size of log ring buffer, may suffix with K or M.\n" @@ -447,10 +448,17 @@ int main(int argc, char **argv) if (android_name_to_log_id("events") == LOG_ID_EVENTS) { dev->next = new log_device_t("events", true, 'e'); if (dev->next) { + dev = dev->next; android::g_devCount++; needBinary = true; } } + if (android_name_to_log_id("crash") == LOG_ID_CRASH) { + dev->next = new log_device_t("crash", false, 'c'); + if (dev->next) { + android::g_devCount++; + } + } break; } @@ -607,6 +615,14 @@ int main(int argc, char **argv) devices->next = new log_device_t("system", false, 's'); android::g_devCount++; } + if (android_name_to_log_id("crash") == LOG_ID_CRASH) { + if (devices->next) { + devices->next->next = new log_device_t("crash", false, 'c'); + } else { + devices->next = new log_device_t("crash", false, 'c'); + } + android::g_devCount++; + } } if (android::g_logRotateSizeKBytes != 0 |