在Boost.Log中正确使用asynchronous_sink::flush()
Properly use asynchronous_sink::flush() in Boost.Log
根据Boost.Log文档(见本页末尾),asynchronous_sink
的flush()
方法需要
sink前端必须在不生成专用的情况下构造线程。
这个要求对我来说没有意义。此外,在整个Boost.Log文档(例如,请参阅这里和这里)的示例代码中也不满足此要求。那么,究竟如何正确使用flush()
法呢?
前提条件不正确。当有一个专用的记录提供线程时,您可以使用flush
。
相关文章:
- std::stringstream::flush() 应该做什么吗?
- std::flush可以用于将对象指针转换为其封闭数组指针吗
- QDataStream and Flush
- std::flush 不起作用,而 std::endl 可以
- 使用boost::log::init_from_settings时如何调用sink->imtiue?
- 你如何"flush" write() 系统调用?
- std::flush、std::vector和move只能构造类型
- 为什么ofstream::flush()返回ostream
- 弦乐:: flush何时打电话
- std :: ostringstream和flush成员功能
- C ++似乎变量与多线程" flush "
- 简单来说,在ostream中flush()的目的是什么
- boost::iostreams::copy-sink-ENOSPC(设备上没有剩余空间)错误处理
- 为什么不编译?(VC++ 2015,#pragma omp flush)
- QFile::flush() vs QFile::close()
- 为什么Qt Creator在cout.flush()调用后添加一个换行符
- 我应该总是在“sink”构造函数或setter参数上移动
- 使用Sink Writer编码音频
- c++ Xersers removeChildnode和flush会留下空行
- 在Boost.Log中正确使用asynchronous_sink::flush()