'Initializes the buffer.
The state of the LogsBuffer is protected by a separate lock.  The lock is
acquired before any variables are mutated or accessed, and released
afterward.  A recursive lock is used so that a single thread can acquire the
lock multiple times, and release it only when an identical number of
\'unlock()\' calls have been performed.'

def __init__(self):

    self._buffer = collections.deque()
    self._lock = threading.RLock()
    self._reset()
