Consider the following code:
This code would start a new debug message before the previous debug message is finished. Libcwd detects this and will output:
NOTICE: Entering foobar() NOTICE: Leaving foobar() KERNEL: The value of foobar() = 2, aint that nice?
Note the indentation and the fact that the printing of the label KERNEL was delayed.
In the previous section
foobar() was a const function: it didn't matter whether or not it was called for the functionality of the application. But when it does matter, then one might want to do something like this:
If generate_tables() would not print debug messages, then the output will look like:
KERNEL: Generating tables... done
When it does generated debug output, then the <unfinished> and <continued> labels are printed also:
KERNEL: Generating tables... <unfinished> NOTICE: Inside generate_tables() KERNEL: <continued> done
Finally, it is also possible to split a debug line into more than two parts by using the special dc::continued debug channel.
When generate_table(i) doesn't print debug messages, then the output will look like:
NOTICE: Generating tables......... done
When it does generate debug output, then each dot would be surrounded by a <continued> .<unfinished> :
NOTICE: Generating tables.<unfinished> TABLE : Inside generate_table(0) NOTICE: <continued> .<unfinished>