00001 /** 00002 * \file 00003 * Minimalistic usage of liblogger, without bothering 00004 * about module name and log level. 00005 * */ 00006 // If you dont want to bother about log levels and module names, 00007 // then the minimum thing that needs to be done is to include the header below 00008 // and start logging. - NOTE LOGS WITH ALL PRIORITY WILL APPEAR IN THIS CASE 00009 #include <liblogger/liblogger.h> 00010 00011 int TestFuncMin() 00012 { 00013 // log the function entry log. 00014 LogFuncEntry(); 00015 00016 LogTrace("Trace log %s %f", "Test", 1.066f); 00017 LogDebug("Debug level log" ); 00018 LogInfo("Info level log %d" , 0); 00019 LogWarn("Warn level log" ); 00020 LogError("Error level log" ); 00021 LogFatal("Fatal level log" ); 00022 00023 if(1) 00024 { 00025 // log the function exit . 00026 LogFuncExit(); 00027 return 0; 00028 } 00029 else 00030 { 00031 // log the function exit . 00032 LogFuncExit(); 00033 return -1; 00034 } 00035 00036 }