summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2015-11-30 13:36:09 -0600
committerMark Salyzyn2015-12-07 16:24:02 -0600
commitf8e546e6090002cde90c21c83b8cdef311e50816 (patch)
tree4b5fe35a78c69b0ec9294478a429ad6369df3156 /include/log
parentfc9f5b8af440974fb390f4572fa526cc68d824db (diff)
downloadplatform-system-core-f8e546e6090002cde90c21c83b8cdef311e50816.tar.gz
platform-system-core-f8e546e6090002cde90c21c83b8cdef311e50816.tar.xz
platform-system-core-f8e546e6090002cde90c21c83b8cdef311e50816.zip
liblog: Support for ANDROID_LOG_WRAP mode flag on reader
If ANDROID_LOG_WRAP is specified, add timeout=3600 to the reader request. logd will comply by going to sleep with the socket open. If the start time is about to wrap or get pruned in the specified log buffers, then wakeup and dump the logs; or wakeup on timeout, whichever comes first. Bug: 25929746 Change-Id: I531b4317a20abcf3ba87d78c68fa2f268a4488ab
Diffstat (limited to 'include/log')
-rw-r--r--include/log/logger.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/log/logger.h b/include/log/logger.h
index ff70529fb..b3928a713 100644
--- a/include/log/logger.h
+++ b/include/log/logger.h
@@ -163,6 +163,8 @@ int android_logger_set_prune_list(struct logger_list *logger_list,
163#define ANDROID_LOG_RDWR O_RDWR 163#define ANDROID_LOG_RDWR O_RDWR
164#define ANDROID_LOG_ACCMODE O_ACCMODE 164#define ANDROID_LOG_ACCMODE O_ACCMODE
165#define ANDROID_LOG_NONBLOCK O_NONBLOCK 165#define ANDROID_LOG_NONBLOCK O_NONBLOCK
166#define ANDROID_LOG_WRAP 0x40000000 /* Block until buffer about to wrap */
167#define ANDROID_LOG_WRAP_DEFAULT_TIMEOUT 7200 /* 2 hour default */
166#define ANDROID_LOG_PSTORE 0x80000000 168#define ANDROID_LOG_PSTORE 0x80000000
167 169
168struct logger_list *android_logger_list_alloc(int mode, 170struct logger_list *android_logger_list_alloc(int mode,