© 2017 John Abbott, Anna Bigatti
GNU Free Documentation License, Version 1.2

CoCoALib Documentation Index


User documentation

CoCoALib offers its own "log output stream" for logging messages (see for instance obsolescent. By default this is std::cout but it may be set to any other stream (_e.g._ std::clog).

NOTE: internally the implementation uses a global variable, so multi-threaded applications should be careful about using LogStreamForThisBlock.


Maintainer documentation

The implementation could hardly be simpler.

The global variable is a pointer because references cannot be reseated in C++ (so it would be impossible to implement mySetLogStreamPtr).

Bugs, shortcomings and other ideas

Should the default CoCoA "log stream" be std::cout or std::clog? std::cout is probably easier to deal with for non-expert users (_e.g._ when redirecting output to a file).

Main changes