log_writer: library for writing testlog json to disk

log_writer is in large part borrowed code from event_log, since
their functions are very similar.  However, log_writer accepts
testlog Event objects, and writes them to disk in JSON format.

The old event_log and log_writer will exist in parallel while
event_log is phased out.

BUG=chromium:609069
TEST=Manually on DUT

Change-Id: I2d6fa067bd11dcebd4b77d97d1b8e51c57be20fb
Reviewed-on: https://chromium-review.googlesource.com/340160
Commit-Ready: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Chun-ta Lin <itspeter@chromium.org>
2 files changed