Unverified Commit 081c0173 authored by RajatBillava's avatar RajatBillava Committed by GitHub
Browse files

Update

parent 6d04a576
Loading
Loading
Loading
Loading
+34 −9
Original line number Diff line number Diff line
diff --git a/liblog/logger_write.c b/liblog/logger_write.c
index 2754e6e..00071c4 100644
--- a/liblog/logger_write.c
+++ b/liblog/logger_write.c
@@ -725,3 +725,19 @@ LIBLOG_ABI_PUBLIC int android_get_log_transport() {
diff --git a/liblog/include/log/log.h b/liblog/include/log/log.h
index 5928649..a04fa40 100644
--- a/liblog/include/log/log.h
+++ b/liblog/include/log/log.h
@@ -164,6 +164,17 @@ clockid_t android_log_clockid(void);
  */
 void __android_log_close(void);
 
   return ret;
 }
+
+#ifndef __unused
+#define __unused  __attribute__((__unused__))
+#endif
@@ -16,7 +15,33 @@ index 2754e6e..00071c4 100644
+    int prio;
+};
+
+LIBLOG_ABI_PUBLIC void __attribute__((weak)) __xlog_buf_printf(int bufid __unused, const struct xlog_record *xlog_record __unused, ...) {
+void __attribute__((weak)) __xlog_buf_printf(int bufid __unused, const struct xlog_record *xlog_record __unused, ...);
+
 #if defined(__clang__)
 #pragma clang diagnostic pop
 #endif
diff --git a/liblog/liblog.map.txt b/liblog/liblog.map.txt
index ce4c53c..2a93d24 100644
--- a/liblog/liblog.map.txt
+++ b/liblog/liblog.map.txt
@@ -8,6 +8,7 @@ LIBLOG {
     __android_log_print;
     __android_log_vprint;
     __android_log_write;
+    __xlog_buf_printf;
   local:
     *;
 };
diff --git a/liblog/logger_write.cpp b/liblog/logger_write.cpp
index a4b3cd7..773be40 100644
--- a/liblog/logger_write.cpp
+++ b/liblog/logger_write.cpp
@@ -656,3 +656,10 @@ int android_get_log_transport() {
 
   return ret;
 }
+
+void __attribute__((weak)) __xlog_buf_printf(int bufid __unused, const struct xlog_record *xlog_record __unused, ...) {
+    va_list args;
+    va_start(args, xlog_record);
+    __android_log_vprint(xlog_record->prio, xlog_record->tag_str, xlog_record->fmt_str, args);