summaryrefslogtreecommitdiffstats
path: root/logcat
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-04-07 14:58:08 -0700
committerMark Salyzyn <salyzyn@google.com>2014-04-16 15:38:50 -0700
commit99f47a9e7c4374f2bbfc18e4a97aa7848245ea33 (patch)
treed277c0e181a563c60703ffe8b7121c04e9ed57d2 /logcat
parent26bb9970c463eb1209803d833799f128484864ac (diff)
downloadcore-99f47a9e7c4374f2bbfc18e4a97aa7848245ea33.tar.gz
core-99f47a9e7c4374f2bbfc18e4a97aa7848245ea33.tar.bz2
core-99f47a9e7c4374f2bbfc18e4a97aa7848245ea33.zip
logd: liblog: logcat: debuggerd: Add LOG_ID_CRASH
Change-Id: Iea453764a1a4fc1661f461f10c641c30150e4d20
Diffstat (limited to 'logcat')
-rw-r--r--logcat/logcat.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/logcat/logcat.cpp b/logcat/logcat.cpp
index ca972087a..995a42e07 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