Log sink implementation. Fixes #351

Wouldn't that mean that whether or not a line is written is actually susceptible to when the system flushes, in case of a system crash?