コード例 #1
0
//	////////////////////////////////////////////////////////////////////////////
void LogHandlerFileBase::EmitLine(const LogEmitControl &emit_control)
{
	if (emit_control.ShouldLogPersistent() || emit_control.ShouldLogScreen()) {
		boost::mutex::scoped_lock my_lock(the_lock_);
		emit_control.UpdateTime();
		if (emit_control.ShouldLogPersistent())
			EmitLineImpl(emit_control);
		if ((!(my_flags_ & NoConsoleOutput)) && emit_control.ShouldLogScreen()) {
			std::cout.write(emit_control.GetLeaderPtr(),
				static_cast<std::streamsize>(emit_control.GetLeaderLength()));
			std::cout.write(emit_control.line_buffer_.c_str(),
				static_cast<std::streamsize>(emit_control.line_buffer_.size()));
			std::cout << std::endl;
		}
	}
}