trace_logger: avoid output of empty lines
It avoids output of empty lines in output buffer if traced messages end with \n (what is common with messages logged from dde_linux). Issue #3714
This commit is contained in:
parent
870d348d77
commit
4639978b3a
|
@ -124,6 +124,10 @@ void Monitor::print(bool activity, bool affinity)
|
||||||
memcpy(_curr_entry_data, entry.data(), length);
|
memcpy(_curr_entry_data, entry.data(), length);
|
||||||
_curr_entry_data[length] = '\0';
|
_curr_entry_data[length] = '\0';
|
||||||
|
|
||||||
|
/* avoid output of empty lines due to end of line character at end */
|
||||||
|
if (_curr_entry_data[length - 1] == '\n')
|
||||||
|
_curr_entry_data[length - 1] = '\0';
|
||||||
|
|
||||||
/* print copied entry data out to log */
|
/* print copied entry data out to log */
|
||||||
if (!printed_buf_entries) {
|
if (!printed_buf_entries) {
|
||||||
log(" <buffer>");
|
log(" <buffer>");
|
||||||
|
|
Loading…
Reference in New Issue