#ifndef ERRLOGSTREAM_H #define ERRLOGSTREAM_H #include #include #include #include #include #include //! output only stream buffer which write to the epics errlog struct errlog_streambuf : public std::streambuf { typedef std::vector buffer_t; errlog_streambuf(bool block=false, size_t blen=126) :std::streambuf() ,p_outbuf(std::max(blen, size_t(16u))+2) ,p_block(block) { p_reset(); } virtual ~errlog_streambuf() {sync();} virtual int_type overflow(int_type c) { size_t nwrite = pptr()-pbase(); assert(nwrite