CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
logsnapshot.cxh
1#include <cx/format/formattable.cxh>
2
3// A rendering of an object argument, taken at the call site.
4//
5// Deferred formatting cannot defer an object: it would render whatever state the object was in
6// when the drain thread got to it rather than when it was logged. So an object argument is
7// rendered immediately and replaced by one of these, which renders back to the text that was
8// captured.
9//
10// It has to be an object rather than the plain string, because the template still says ${object}
11// and a placeholder resolves by type. The substitution is therefore invisible to the format
12// string, which is the entire point.
13class LogSnapshot implements Formattable
14{
15 string text;
16 factory create(string text);
17}