platform_system_core/include/log
Mark Salyzyn fc148f7f33 liblog: add IF_ALOG_RATELIMIT
IF_ALOG_RATELIMIT()
    ALOGE("Only one message globally using IF_ALOG_RATELIMIT()"
          " in the process may appear ever ten seconds,"
          " (%s)", strerror(errno));

static time_t last; /* initial state zero */
IF_ALOG_RATELIMIT_LOCAL(60, &last)
    ALOGE("Only one message locally may appear every minute,"
          " (%s)", strerror(errno));

These new calls are guaranteed not to affect the value of a
non-zero errno to simplify logging of errors.  However, the
ALOGE calls in the above examples may update the errno value
upon their return.

Test: gTest liblog-unit-tests --gtest_filter=liblog.__android_log_ratelimit
Bug: 33535908
Change-Id: Id8cc192fc7d14504ffd418933cf88ae945c089f2
2016-12-21 21:36:14 +00:00
..
event_tag_map.h liblog: add android_lookupEventFormat_len 2016-11-04 15:22:52 -07:00
log.h liblog: add IF_ALOG_RATELIMIT 2016-12-21 21:36:14 +00:00
log_event_list.h liblog: add private android_log_write_list_buffer() 2016-11-21 09:46:39 -08:00
logd.h log/logd.h should point to log/log.h 2016-10-25 09:21:00 -07:00
logger.h liblog: logd: logcat: Split out log/logger.h into public and private. 2016-10-24 11:12:49 -07:00
logprint.h liblog: logcat: logprint support -v descriptive 2016-11-04 15:22:52 -07:00
uio.h Only Windows doesn't have <sys/uio.h>. 2014-11-25 13:27:43 -08:00