am eb560133: Merge "Share log writing code."

* commit 'eb56013348668a292fb7302e34752a2b9cbcb834':
  Share log writing code.