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
6 files changed
tree: d0c9a92b39bb37f5620ac598d97ea27ce8d9bfd1
  1. stats/