Next: Adding Testing Groups
Up: Miscellaneous
Previous: Using Transformations
Contents
Index
Printing Error/Warning/Debugging Information
- Using the Log Class
- In your main() file, set log level: Log::logger()
set_log_level(WARNING_LOG);
- Log message in different levels: (log functions use the same
argument format like printf()).
- LOGERR("out of memory");
- LOGWARN("invalid image size");
- LOGDEBUG("image mean density =
%f
",
mean);
- LOGVAR("image size = (%d, %d,
%d)
", nx, ny, nz);
- To log function enter point, use ENTERFUNC; To log
function exit point, use EXITFUNC.
2013-06-11