Added write method to log writer.
Merge branch '4.1'