When using the corto logging framework, it is possible to specify components by adding a string followed by an :, like this:
corto_info("myComponent: the info message");
This is however of limited usefulness, as code often does not know in which context it is called, and without this context a message loses part of its meaning. To make keeping track of this context easier, a user should be able to "push" and "pop" components, like this:
corto_component_push("myComponent");
corto_info("the info message");
corto_component_pop();
Suppose that this code was called from another part of the code that also pushed a component called "root", then the log message would like like this:
When using the corto logging framework, it is possible to specify components by adding a string followed by an
:
, like this:This is however of limited usefulness, as code often does not know in which context it is called, and without this context a message loses part of its meaning. To make keeping track of this context easier, a user should be able to "push" and "pop" components, like this:
Suppose that this code was called from another part of the code that also pushed a component called "root", then the log message would like like this: