43 : m_stream(s), m_max_history_size(max_history_size)
64 std::string::size_type p = str.find_first_of(
'\n');
66 if ( p == std::string::npos )
67 m_current_line += str;
71 m_current_line += str.substr(0, p);
73 output_current_line();
75 if ( p != str.length() )
76 write( str.substr(p) );
93 void claw::log_stream_concise::output_current_line()
96 (m_previous_lines.begin(), m_previous_lines.end(), m_current_line)
97 == m_previous_lines.end() )
99 m_previous_lines.push_back( m_current_line );
100 m_stream->write( m_current_line );
102 if (m_previous_lines.size() > m_max_history_size)
103 m_previous_lines.pop_front();
106 m_current_line.clear();