summaryrefslogtreecommitdiffstats
path: root/liblog
diff options
context:
space:
mode:
Diffstat (limited to 'liblog')
-rw-r--r--liblog/log_is_loggable.c2
-rw-r--r--liblog/logd_write_kern.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/liblog/log_is_loggable.c b/liblog/log_is_loggable.c
index 7a8e33f..cd85ff6 100644
--- a/liblog/log_is_loggable.c
+++ b/liblog/log_is_loggable.c
@@ -93,7 +93,7 @@ static int __android_log_level(const char *tag, int def)
if (taglen) {
uint32_t current_local_serial = current_global_serial;
- if (!last_tag || strcmp(last_tag, tag)) {
+ if (!last_tag || (last_tag[0] != tag[0]) || strcmp(last_tag + 1, tag + 1)) {
/* invalidate log.tag.<tag> cache */
for(i = 0; i < (sizeof(tag_cache) / sizeof(tag_cache[0])); ++i) {
tag_cache[i].pinfo = NULL;
diff --git a/liblog/logd_write_kern.c b/liblog/logd_write_kern.c
index 8742b34..bd43238 100644
--- a/liblog/logd_write_kern.c
+++ b/liblog/logd_write_kern.c
@@ -26,7 +26,9 @@
#include <time.h>
#include <unistd.h>
+#ifdef __BIONIC__
#include <android/set_abort_message.h>
+#endif
#include <log/log.h>
#include <log/logd.h>
@@ -167,9 +169,11 @@ int __android_log_buf_write(int bufID, int prio, const char *tag, const char *ms
tag = tmp_tag;
}
+#ifdef __BIONIC__
if (prio == ANDROID_LOG_FATAL) {
android_set_abort_message(msg);
}
+#endif
vec[0].iov_base = (unsigned char *) &prio;
vec[0].iov_len = 1;