Initialising the output stream

  logostream(std::basic_ostream<charT, traits>& out) :
    logoutbuf_init(),
    std::basic_ostream<charT, traits>(logoutbuf_init::buf())
  {
    logoutbuf_init::buf()->init(out.rdbuf());
  }
The constructor takes a single parameter which is the output stream and its body passes its stream buffer to logoutbuf via init (suddenly the trade off doesn't seem so bad).