stats_event_list changes for statsd mainline api

Cherry pick to aosp.
stats_event_list changes for creating a generic api for statsd mainline
logging.

Test: builds
Test: existing logs continue to flow
Change-Id: I4163edc80ffcca61db7ab2a1e14ae8c14aab2347
Merged-In: I4163edc80ffcca61db7ab2a1e14ae8c14aab2347
(cherry picked from commit 4c2f079dad)
This commit is contained in:
Tej Singh 2019-03-19 22:03:34 -07:00
parent e346d03c2b
commit a7c1ff6906
2 changed files with 4 additions and 1 deletions

View file

@ -18,6 +18,7 @@
#define ANDROID_STATS_LOG_STATS_EVENT_LIST_H
#include <log/log_event_list.h>
#include <sys/uio.h>
#ifdef __cplusplus
extern "C" {
@ -27,6 +28,8 @@ int write_to_logger(android_log_context context, log_id_t id);
void note_log_drop(int error);
void stats_log_close();
int android_log_write_char_array(android_log_context ctx, const char* value, size_t len);
extern int (*write_to_statsd)(struct iovec* vec, size_t nr);
#ifdef __cplusplus
}
#endif

View file

@ -41,7 +41,7 @@ typedef struct {
extern struct android_log_transport_write statsdLoggerWrite;
static int __write_to_statsd_init(struct iovec* vec, size_t nr);
static int (*write_to_statsd)(struct iovec* vec, size_t nr) = __write_to_statsd_init;
int (*write_to_statsd)(struct iovec* vec, size_t nr) = __write_to_statsd_init;
// Similar to create_android_logger(), but instead of allocation a new buffer,
// this function resets the buffer for resuse.