summaryrefslogtreecommitdiffstats
path: root/liblog
diff options
context:
space:
mode:
authorTom Cherry2018-02-20 16:45:12 -0600
committerTom Cherry2018-02-20 16:59:28 -0600
commit73ac28b4086f6d9f11433bcaa4fa601d079e9d04 (patch)
tree2e144b74f35aaea7b101715e2bf43fb92ecc55bd /liblog
parente1ae2ff9e46547dfaa3947eedd5e471332c92a86 (diff)
downloadplatform-system-core-73ac28b4086f6d9f11433bcaa4fa601d079e9d04.tar.gz
platform-system-core-73ac28b4086f6d9f11433bcaa4fa601d079e9d04.tar.xz
platform-system-core-73ac28b4086f6d9f11433bcaa4fa601d079e9d04.zip
Expose __android_log_buf_print and __android_log_buf_write to NDK
These are needed to build libbase with the NDK. Bug: 73658597 Test: tree hugger Change-Id: Icf4a82c5c08975731c180be155743ac63f4bfd50
Diffstat (limited to 'liblog')
-rw-r--r--liblog/include/android/log.h30
-rw-r--r--liblog/liblog.map.txt4
2 files changed, 32 insertions, 2 deletions
diff --git a/liblog/include/android/log.h b/liblog/include/android/log.h
index ade282187..28c87e46d 100644
--- a/liblog/include/android/log.h
+++ b/liblog/include/android/log.h
@@ -171,6 +171,36 @@ void __android_log_assert(const char* cond, const char* tag, const char* fmt,
171#endif 171#endif
172 ; 172 ;
173 173
174#ifndef log_id_t_defined
175#define log_id_t_defined
176typedef enum log_id {
177 LOG_ID_MIN = 0,
178
179 LOG_ID_MAIN = 0,
180 LOG_ID_RADIO = 1,
181 LOG_ID_EVENTS = 2,
182 LOG_ID_SYSTEM = 3,
183 LOG_ID_CRASH = 4,
184 LOG_ID_STATS = 5,
185 LOG_ID_SECURITY = 6,
186 LOG_ID_KERNEL = 7, /* place last, third-parties can not use it */
187
188 LOG_ID_MAX
189} log_id_t;
190#endif
191
192/*
193 * Send a simple string to the log.
194 */
195int __android_log_buf_write(int bufID, int prio, const char* tag,
196 const char* text);
197int __android_log_buf_print(int bufID, int prio, const char* tag,
198 const char* fmt, ...)
199#if defined(__GNUC__)
200 __attribute__((__format__(printf, 4, 5)))
201#endif
202 ;
203
174#ifdef __cplusplus 204#ifdef __cplusplus
175} 205}
176#endif 206#endif
diff --git a/liblog/liblog.map.txt b/liblog/liblog.map.txt
index 9d21e56eb..66670fe28 100644
--- a/liblog/liblog.map.txt
+++ b/liblog/liblog.map.txt
@@ -3,8 +3,8 @@ LIBLOG {
3 android_name_to_log_id; # vndk 3 android_name_to_log_id; # vndk
4 android_log_id_to_name; # vndk 4 android_log_id_to_name; # vndk
5 __android_log_assert; 5 __android_log_assert;
6 __android_log_buf_print; # vndk 6 __android_log_buf_print;
7 __android_log_buf_write; # vndk 7 __android_log_buf_write;
8 __android_log_print; 8 __android_log_print;
9 __android_log_vprint; 9 __android_log_vprint;
10 __android_log_write; 10 __android_log_write;