Don't let ConsoleSink data fields overlap
This MR fixes the cases where the data being printed by the ConsoleSink is formatted to have the same number of printed characters as the width of the aligned columns. In such cases, there is ambiguity at where the data from one column ends and the data from the next column begins.
To achieve the formatting where this is not the case, I have
used snprintf
to format the printed data fields. For the
case of printing a std::string
, the data field is truncated on the right as: string_field.substr(0, col_width-1)
.
The commit also adds a private data member int m_col_width
to the
ConsoleSink
class, which is by default 10.
This overlapping of data fields has not been checked in the other sink classes.
Related to #44 (closed).