summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2014-10-02 13:12:28 -0500
committerMark Salyzyn2015-02-09 16:12:59 -0600
commit956870518ee89b5302b8409ac78f287bf091d9ed (patch)
treea6b832d88bf2871e6a7fe59be7108da1561ab08a /liblog/fake_log_device.c
parent3bc8ae63ce3bbcc0ab61def99a4e9b4822ba3f51 (diff)
downloadplatform-system-core-956870518ee89b5302b8409ac78f287bf091d9ed.tar.gz
platform-system-core-956870518ee89b5302b8409ac78f287bf091d9ed.tar.xz
platform-system-core-956870518ee89b5302b8409ac78f287bf091d9ed.zip
liblog: add __android_log_is_loggable()
- Add new liblog API __android_log_is_loggable(prio, tag, def) - future plan to integrate this into the runtime checks and into the logd daemon for filtration. Inert for now. Bug: 17760225 Change-Id: I16395b4d42acc08f0209f55a1cbf87b0b2112898
Diffstat (limited to 'liblog/fake_log_device.c')
-rw-r--r--liblog/fake_log_device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/liblog/fake_log_device.c b/liblog/fake_log_device.c
index cf3dc500c..8a8ece250 100644
--- a/liblog/fake_log_device.c
+++ b/liblog/fake_log_device.c
@@ -689,3 +689,9 @@ ssize_t fakeLogWritev(int fd, const struct iovec* vector, int count)
689 /* Assume that open() was called first. */ 689 /* Assume that open() was called first. */
690 return redirectWritev(fd, vector, count); 690 return redirectWritev(fd, vector, count);
691} 691}
692
693int __android_log_is_loggable(int prio, const char *tag __unused, int def)
694{
695 int logLevel = def;
696 return logLevel >= 0 && prio >= logLevel;
697}