summaryrefslogtreecommitdiff
path: root/debuggerd/libdebuggerd/utility.cpp
diff options
context:
space:
mode:
authorChenjie Luo <cjluo@google.com>2017-03-06 12:12:07 -0800
committerChenjie Luo <cjluo@google.com>2017-03-06 15:04:32 -0800
commit97258aad8a41e375696a06793e5de3e9d75f6f1b (patch)
tree67f59b8aefbad3d0f3e81dd389e5efcf6bb8048c /debuggerd/libdebuggerd/utility.cpp
parent56e89ade33c649412999d2663acc2f12ca9873a8 (diff)
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
Diffstat (limited to 'debuggerd/libdebuggerd/utility.cpp')
-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) {
return false;
}
+__attribute__((__weak__, visibility("default")))
void _LOG(log_t* log, enum logtype ltype, const char* fmt, ...) {
bool write_to_tombstone = (log->tfd != -1);
bool write_to_logcat = is_allowed_in_logcat(ltype)