summaryrefslogtreecommitdiffstats
path: root/logcat
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-12-15 10:01:31 -0800
committerMark Salyzyn <salyzyn@google.com>2015-02-26 07:22:15 -0800
commit7c975ac3a471d4c7f6a7246558e5e9295118a97d (patch)
tree24580aff198db6dd2471e5d0ab863bbedd2de611 /logcat
parent6eef4171195f83541b3ee62cdcc4eac863c5edd9 (diff)
downloadsystem_core-7c975ac3a471d4c7f6a7246558e5e9295118a97d.zip
system_core-7c975ac3a471d4c7f6a7246558e5e9295118a97d.tar.gz
system_core-7c975ac3a471d4c7f6a7246558e5e9295118a97d.tar.bz2
logcat: add pstore read
Used to pull the Android log messages after a reboot. A companion to the pstore console logs. Adding the -L flag triggers this behavior. Change-Id: Icce2dc00bcbb26975bea604420c6be397869e804
Diffstat (limited to 'logcat')
-rw-r--r--logcat/logcat.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/logcat/logcat.cpp b/logcat/logcat.cpp
index d831d66..cd5003e 100644
--- a/logcat/logcat.cpp
+++ b/logcat/logcat.cpp
@@ -237,6 +237,7 @@ static void show_help(const char *cmd)
" -T '<time>' print most recent lines since specified time (not imply -d)\n"
" count is pure numerical, time is 'MM-DD hh:mm:ss.mmm'\n"
" -g get the size of the log's ring buffer and exit\n"
+ " -L dump logs from prior to last reboot\n"
" -b <buffer> Request alternate ring buffer, 'main', 'system', 'radio',\n"
" 'events', 'crash' or 'all'. Multiple -b parameters are\n"
" allowed and results are interleaved. The default is\n"
@@ -348,7 +349,7 @@ int main(int argc, char **argv)
for (;;) {
int ret;
- ret = getopt(argc, argv, "cdDt:T:gG:sQf:r:n:v:b:BSpP:");
+ ret = getopt(argc, argv, "cdDLt:T:gG:sQf:r:n:v:b:BSpP:");
if (ret < 0) {
break;
@@ -365,6 +366,10 @@ int main(int argc, char **argv)
mode |= ANDROID_LOG_WRONLY;
break;
+ case 'L':
+ mode |= ANDROID_LOG_PSTORE;
+ break;
+
case 'd':
mode |= ANDROID_LOG_RDONLY | ANDROID_LOG_NONBLOCK;
break;