summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2015-02-04 14:39:57 -0600
committerMark Salyzyn2017-02-08 15:37:41 -0600
commit850d06e1c94bd292841c3ed9d7e1c0161d84d743 (patch)
treedc72d191425b6b5a206859379fd01b87730ff745 /liblog/README
parentec5d6cb8fdcabaaaba2836712f5b7ee58321c3b8 (diff)
downloadplatform-system-core-850d06e1c94bd292841c3ed9d7e1c0161d84d743.tar.gz
platform-system-core-850d06e1c94bd292841c3ed9d7e1c0161d84d743.tar.xz
platform-system-core-850d06e1c94bd292841c3ed9d7e1c0161d84d743.zip
liblog: Add android_set_log_frontend
android_set_log_frontend allows one to select LOGGER_DEFAULT, LOGGER_LOGD or LOGGER_NULL, the latter allows a runtime mechanism to turn logging on or off. LOGGER_DEFAULT is LOGGER_LOGD. Test: gTest liblog-unit-tests notably liblog.android_set_log_frontend and liblog-benchmarks before and after. Bug: 27405083 Change-Id: I365dbee9f7d83112da0ef8d1cace748d247773c8
Diffstat (limited to 'liblog/README')
-rw-r--r--liblog/README13
1 files changed, 12 insertions, 1 deletions
diff --git a/liblog/README b/liblog/README
index 610338c2f..922b5e3d5 100644
--- a/liblog/README
+++ b/liblog/README
@@ -108,6 +108,11 @@ SYNOPSIS
108 108
109 int android_log_destroy(android_log_context *ctx) 109 int android_log_destroy(android_log_context *ctx)
110 110
111 #include <log/log_frontend.h>
112
113 int android_set_log_frontend(int frontend_flag)
114 int android_get_log_frontend()
115
111 Link with -llog 116 Link with -llog
112 117
113DESCRIPTION 118DESCRIPTION
@@ -162,6 +167,12 @@ DESCRIPTION
162 when opening the sub-log. It is recommended to open the log 167 when opening the sub-log. It is recommended to open the log
163 ANDROID_LOG_RDONLY in these cases. 168 ANDROID_LOG_RDONLY in these cases.
164 169
170 android_set_log_frontend() selects frontend filters. Argument is either
171 LOGGER_DEFAULT, LOGGER_LOGD or LOGGER_NULL. The latter drops all
172 content on the floor. Both android_set_log_frontend() and
173 android_get_log_frontend() return the current frontend mask, or a
174 negative errno for any problems.
175
165ERRORS 176ERRORS
166 If messages fail, a negative error code will be returned to the caller. 177 If messages fail, a negative error code will be returned to the caller.
167 178
@@ -194,4 +205,4 @@ SEE ALSO
194 205
195 206
196 207
197 17 Oct 2016 LIBLOG(3) 208 08 Feb 2017 LIBLOG(3)