diff options
Diffstat (limited to 'log.cpp')
-rw-r--r-- | log.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -41,6 +41,7 @@ log_stream& log_stream::operator<<( void log_stream::trim_buffer() { std::string s = m_buffer.str(); + size_t pos = s.npos; for (int i = 0; i <= m_log_lines; ++i) { pos = s.rfind("\n", pos); @@ -54,4 +55,5 @@ void log_stream::trim_buffer() } m_buffer.str(s.substr((pos <= (s.size() - 2)) ? pos + 2 : pos)); + m_buffer.seekp(0, std::ios_base::end); } |