OSDN Git Service

Allow StatsLog to directly write to statsd's socket.
authorYao Chen <yaochen@google.com>
Wed, 18 Apr 2018 20:45:48 +0000 (13:45 -0700)
committerYao Chen <yaochen@google.com>
Fri, 20 Apr 2018 21:52:01 +0000 (14:52 -0700)
commitf7bc6ab7fa21f849250d0f5ee2849f9e49a8d436
tree3d751dab478cd4792facae3762ada90308b70cb1
parent46e58e1b4086aa0e3eb62f9cdae0eefaea08943f
Allow StatsLog to directly write to statsd's socket.

+ Reuse the log_event_list from liblog. StatsLog's binary format remains unchanged
+ Copied socket write code from liblog, including the retry logic.
+ Added build flags to control the StatsLog channel (logd, statsd, or both for debugging)

Bug: 78239479
Test: locally tested and saw logs being written to statsd

Change-Id: I7b1f0069ead00bbf3c29e4bd5b7f363a7ce26abe
cmds/statsd/statsd.rc
tools/stats_log_api_gen/Android.bp
tools/stats_log_api_gen/main.cpp
tools/stats_log_api_gen/stats_event_list.cpp [new file with mode: 0644]
tools/stats_log_api_gen/stats_event_list.h [new file with mode: 0644]
tools/stats_log_api_gen/statsd_writer.cpp [new file with mode: 0644]
tools/stats_log_api_gen/statsd_writer.h [new file with mode: 0644]