Commit 3731a996 authored by Mihai Moldovan's avatar Mihai Moldovan

nxcomp/src/Log.cpp: only create a new queue entry if we actually intend to write it out later.

Fixes: ArcticaProject/nx-libs#596
parent 7882a39a
......@@ -110,9 +110,9 @@ NXLog& operator<< (NXLog& out, const NXLogStamp& value)
out.current_file( value.file() );
// Writing an NXLogStamp to the stream indicates the start of a new entry.
// If there's any content in the buffer, create a new entry in the output
// queue.
if ( out.synchronized() )
// If there's any content in the buffer and we actually intend to keep that line,
// create a new entry in the output queue.
if ( out.synchronized() && out.will_log() )
out.new_stack_entry();
out << out.stamp_to_string(value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment