4 * The expected output is :
6 * 1043174856 logA<*1>: a message+
7 * 1043174856 logB<*2>: b message+
8 * 1043174856 logC<*3>: c message with extra newline+
9 * 1043174856 logC<*4>: c2 message+
10 * 1043174856 logA<Info>: a info message+
11 * 1043174856 logA<*1>: a normal message with [07][08] control chars+
12 * 1043174856 logA<*1>: a split+
13 * 1043174856 logB<*2>: message with stuff+
14 * 1043174856 logB<Info>: and other stuff.+
15 * 1043174856 logC<*3>: another split message.+
18 * 1043174856 logA<*1>: a message+
19 * 1043174856 logB<*2>: b message+
20 * 1043174856 logC<*3>: c message with extra newline+
21 * 1043174856 logC<*4>: c2 message+
22 * 1043174856 logA<Info>: a info message+
23 * 1043174856 logA<*1>: a normal message with [07][08] control chars+
24 * 1043174856 logA<*1>: a split+
25 * 1043174856 logB<*2>: message with stuff+
26 * 1043174856 logB<Info>: and other stuff.+
27 * 1043174856 logC<*3>: another split message.+
28 * 1043174856 logC<*3>: .. and it's wonky!+
32 #include "wvlogbuffer.h"
38 WvLog
a("logA", WvLog::Debug
), b("logB", WvLog::Debug2
);
39 WvLog
c("logC", WvLog::Debug3
), c2
= c
.split(WvLog::Debug4
);
43 c("c message with extra newline\n\n\n"); // extra newline discarded
46 // the second line should be back at WvLog::Debug
47 a(WvLog::Info
, "a info message\n");
48 a("a normal message with \a\b control chars\r\n");
50 // should display like this:
51 // a split // message with stuff // and other stuff
55 b(WvLog::Info
, "and other stuff.\n");
57 // should display all on one line
59 c2(WvLog::Debug3
, "message.");
61 // should auto-terminate line on display
65 c2(WvLog::Debug3
, " .. and it's wonky! \n");