Thanks,
Benjamin
///// rolling_file.hpp ///////
void recreate_file() {...
m_cur_size = 0;
}
template<class msg_type> void write( const msg_type& msg) {
convert_dest::write(msg, (*m_out) );
// flush each time
m_cur_size += msg.size();
m_out->flush();
if ( m_cur_size > m_flags.max_size_bytes()) {
m_cur_idx = (m_cur_idx + 1) % m_flags.file_count();
recreate_file();
}
}
size_t m_cur_size;
//////////////////////////////////////
John Torjo a écrit :
Hi Benjamin,
Hi all,
Glad you posted this here :)
Does anybody use boost::logging ?
I wonder if it's possible to flush logs in a rolling_file as in a
standard file (flush_each_time) ?
It would be nice !
Yes it would, and it can ;)
Best,
John
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users