summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2016-10-17 16:28:00 -0500
committerMark Salyzyn2016-10-20 10:11:39 -0500
commitcfd5b080af8de527d768f0ff7902c26af8d49307 (patch)
tree32295b3aeb6ba8a116592576939348d09814b0be /liblog/README
parent1edd61ce5d2f34ff34d015643b5915b3b1c186e8 (diff)
downloadplatform-system-core-cfd5b080af8de527d768f0ff7902c26af8d49307.tar.gz
platform-system-core-cfd5b080af8de527d768f0ff7902c26af8d49307.tar.xz
platform-system-core-cfd5b080af8de527d768f0ff7902c26af8d49307.zip
system/core: preparation to pull back interfaces from android/log.h
Point to log/log.h where necessary, define LOG_TAG where necessary. Accept that private/android_logger.h is suitable replacement for log/logger.h and android/log.h. Correct liblog/README Effectively a cleanup and controlled select revert of 'system/core: drop or replace log/logger.h' and 'system/core: Replace log/log.h with android/log.h'. Test: compile Bug: 30465923 Change-Id: Ic2ad157bad6f5efe2c6af293a73bb753300b17a2
Diffstat (limited to 'liblog/README')
-rw-r--r--liblog/README59
1 files changed, 44 insertions, 15 deletions
diff --git a/liblog/README b/liblog/README
index eefa80fef..dd378325a 100644
--- a/liblog/README
+++ b/liblog/README
@@ -1,12 +1,18 @@
1LIBLOG(3) Android NDK Programming Manual LIBLOG(3) 1LIBLOG(3) Android Internal NDK Programming Manual LIBLOG(3)
2 2
3 3
4 4
5NAME 5NAME
6 liblog - Android NDK logger interfaces 6 liblog - Android Internal NDK logger interfaces
7 7
8SYNOPSIS 8SYNOPSIS
9 #include <android/log.h> 9 /*
10 * Please limit to 24 characters for runtime is loggable,
11 * 16 characters for persist is loggable, and logcat pretty
12 * alignment with limit of 7 characters.
13 */
14 #define LOG_TAG "yourtag"
15 #include <log/log.h>
10 16
11 ALOG(android_priority, tag, format, ...) 17 ALOG(android_priority, tag, format, ...)
12 IF_ALOG(android_priority, tag) 18 IF_ALOG(android_priority, tag)
@@ -66,21 +72,44 @@ SYNOPSIS
66 int android_logger_get_log_readable_size(struct logger *logger) 72 int android_logger_get_log_readable_size(struct logger *logger)
67 int android_logger_get_log_version(struct logger *logger) 73 int android_logger_get_log_version(struct logger *logger)
68 74
69 struct logger_list *android_logger_list_alloc(int mode, unsigned int 75 struct logger_list *android_logger_list_alloc(int mode,
70 tail, pid_t pid) 76 unsigned int tail,
71 struct logger *android_logger_open(struct logger_list *logger_list, 77 pid_t pid)
72 log_id_t id) 78 struct logger *android_logger_open(struct logger_list *logger_list,
73 struct logger_list *android_logger_list_open(log_id_t id, int mode, 79 log_id_t id)
74 unsigned int tail, pid_t pid) 80 struct logger_list *android_logger_list_open(log_id_t id, int mode,
75 81 unsigned int tail,
76 int android_logger_list_read(struct logger_list *logger_list, struct 82 pid_t pid)
77 log_msg *log_msg 83 int android_logger_list_read(struct logger_list *logger_list,
78 84 struct log_msg *log_msg)
79 void android_logger_list_free(struct logger_list *logger_list) 85 void android_logger_list_free(struct logger_list *logger_list)
80 86
81 log_id_t android_name_to_log_id(const char *logName) 87 log_id_t android_name_to_log_id(const char *logName)
82 const char *android_log_id_to_name(log_id_t log_id) 88 const char *android_log_id_to_name(log_id_t log_id)
83 89
90 android_log_context create_android_logger(uint32_t tag)
91
92 int android_log_write_list_begin(android_log_context ctx)
93 int android_log_write_list_end(android_log_context ctx)
94
95 int android_log_write_int32(android_log_context ctx, int32_t value)
96 int android_log_write_int64(android_log_context ctx, int64_t value)
97 int android_log_write_string8(android_log_context ctx,
98 const char *value)
99 int android_log_write_string8_len(android_log_context ctx,
100 const char *value, size_t maxlen)
101 int android_log_write_float32(android_log_context ctx, float value)
102
103 int android_log_write_list(android_log_context ctx,
104 log_id_t id = LOG_ID_EVENTS)
105
106 android_log_context create_android_log_parser(const char *msg,
107 size_t len)
108 android_log_list_element android_log_read_next(android_log_context ctx)
109 android_log_list_element android_log_peek_next(android_log_context ctx)
110
111 int android_log_destroy(android_log_context *ctx)
112
84 Link with -llog 113 Link with -llog
85 114
86DESCRIPTION 115DESCRIPTION
@@ -163,8 +192,8 @@ ERRORS
163 library retries on EINTR, -EINTR should never be returned. 192 library retries on EINTR, -EINTR should never be returned.
164 193
165SEE ALSO 194SEE ALSO
166 syslogd(8) 195 syslogd(8), klogd, auditd(8)
167 196
168 197
169 198
170 24 Jan 2014 LIBLOG(3) 199 17 Oct 2016 LIBLOG(3)