Prepending the time date string

virtual int sync()
  if(!buffer_.empty() && out_)
  {
    std::basic_string<charT, traits> time = format_time();
    out_->sputn(time.c_str(),
      static_cast<std::streamsize>(time.length()));

    out_->sputn(&buffer_[0],
      static_cast<std::streamsize>(buffer_.size()));
    buffer_.clear();
  }
  return 0;
}
The time date string is flushed to the output buffer, again using sputn, prior to the buffer being flushed. This is achieved by modifying sync().