Return logging text through custom out_stream.

Now to solve the problem of non-copyable ostream.