Digging A Ditch
Writing a custom stream
A logging stream must:
- Buffer the characters streamed to it
- Write a timestamp to an output stream
- Flush the buffer characters to the output stream
A logging stream requires the characters to be buffered. When the buffer is flushed the time and date are prepended before it is passed on to the next stream.