LBIBCell
|
This page contains the following sections:
To log a message in miind use the following macro:
This would then log a message of the level logWARNING if the current reporting level is higher that logWARNING. Otherwise the logging would be ignored. As this check is done at compile time you pay only for log messages if they are actually printed.
The default logging level is defined by the flag DEBUGLEVEL then everything is printed to the log. To change the reporting level of the log class the following code is needed:
This code would set the reporting level to logWARNING
In the default version log messages are printed to std::cerr. To print the log messages into a log file the following code is needed:
This code would redirect the log messages to the file with the name MYLOGFILENAME.
The macro allows easier generation of log messages. It also improves the efficiency significantly as the checks are conducted at compile time.
is forbidden. Please use then instead a temporary variable:
or alternatively write it the following way:
However try to use the macro with temporary variables.