The logging thread is always active. The main thread uses SwapQueues to pass events to the logging thread. The logging thread moves the events to either a RingBuffer history in memory, or to a string which is written to disc. RtcEventLogImpl constructor takes a clock for easier testing. BUG=webrtc:4741 Review URL: https://codereview.webrtc.org/1687703002 Cr-Commit-Position: refs/heads/master@{#12476}