summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChenjie Luo2017-03-06 14:12:07 -0600
committerChenjie Luo2017-03-06 17:04:32 -0600
commit97258aad8a41e375696a06793e5de3e9d75f6f1b (patch)
tree67f59b8aefbad3d0f3e81dd389e5efcf6bb8048c
parent56e89ade33c649412999d2663acc2f12ca9873a8 (diff)
downloadplatform-system-core-97258aad8a41e375696a06793e5de3e9d75f6f1b.tar.gz
platform-system-core-97258aad8a41e375696a06793e5de3e9d75f6f1b.tar.xz
platform-system-core-97258aad8a41e375696a06793e5de3e9d75f6f1b.zip
Define _LOG as a weak symbol.
So _LOG could be overridden by customized logging implementations in non-Android systems. Bug: 35919515 Test: Test on device Change-Id: I0885c15353c0b1bf66f6f156e7f502f326b85d57
-rw-r--r--debuggerd/libdebuggerd/utility.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/debuggerd/libdebuggerd/utility.cpp b/debuggerd/libdebuggerd/utility.cpp
index 57209aaef..744cd72af 100644
--- a/debuggerd/libdebuggerd/utility.cpp
+++ b/debuggerd/libdebuggerd/utility.cpp
@@ -41,6 +41,7 @@ bool is_allowed_in_logcat(enum logtype ltype) {
41 return false; 41 return false;
42} 42}
43 43
44__attribute__((__weak__, visibility("default")))
44void _LOG(log_t* log, enum logtype ltype, const char* fmt, ...) { 45void _LOG(log_t* log, enum logtype ltype, const char* fmt, ...) {
45 bool write_to_tombstone = (log->tfd != -1); 46 bool write_to_tombstone = (log->tfd != -1);
46 bool write_to_logcat = is_allowed_in_logcat(ltype) 47 bool write_to_logcat = is_allowed_in_logcat(ltype)