[PATCH] Raw data debugging

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Thu, 13 Dec 2012 17:54:39 -0700

Hello,

    The attached patch adds Raw, an std::ostream manipulator to print
possibly non-terminated buffers and their labels/sizes.

The Raw manipulator tries to be smart about printing buffers at various
debugging levels: Large buffers are only printed at DBG_DATA by default.
This allows the caller to mix higher-level debug messages with dumping
of potentially large volumes of data. This smartness can be overruled
using an explicit minLevel() method call.

I think this manipulator can be useful in many places. The next patch I
will post illustrates such usage for helper debugging.

Thank you,

Alex.

Received on Fri Dec 14 2012 - 00:54:45 MST

This archive was generated by hypermail 2.2.0 : Fri Dec 14 2012 - 12:00:10 MST