docker/docker — pull request #9753 by cpuguy83 (2014-12-19 20:27:37+00:00)
Title: Fetch truncate logs

Use new filewriter package for logging to disk.

This allows for safe log truncation.

filewriter is an io.WriteCloser. It takes a file path and a buffer
size on initializing and proxies all writes to a file at the given path.

This allows for safe truncation as there is a lock in place ensuring no
data is written from the buffer until after truncation is finished, and
truncation can't run until the existing write to the file is finished.