testapp/src_debug.cpp File Reference


Detailed Description

Sample file illustrating the log priority usage. In this file, we choose logs of priority debug or higher

Definition in file src_debug.cpp.

#include <liblogger/liblogger_levels.h>
#include <liblogger/liblogger.h>

Go to the source code of this file.

Defines

#define LOG_LEVEL   LOG_LEVEL_DEBUG
#define LOG_MODULE_NAME   "ModuleDebugTest"

Functions

int TestFuncDebug ()


Define Documentation

#define LOG_LEVEL   LOG_LEVEL_DEBUG

Definition at line 10 of file src_debug.cpp.

#define LOG_MODULE_NAME   "ModuleDebugTest"

Definition at line 12 of file src_debug.cpp.


Function Documentation

int TestFuncDebug (  ) 

Definition at line 15 of file src_debug.cpp.

00016 {
00017         // log the function entry log.
00018         LogFuncEntry();
00019 
00020         LogTrace("Trace log %s %f", "Test", 1.066f);
00021         LogDebug("Debug level log" );
00022         LogInfo("Info level log %d" , 0);
00023         LogWarn("Warn level log" );
00024         LogError("Error level log" );
00025         LogFatal("Fatal level log" );
00026 
00027         if(1)
00028         {
00029                 // log the function exit .
00030                 LogFuncExit();
00031                 return 0;
00032         }
00033         else
00034         {
00035                 // log the function exit .
00036                 LogFuncExit();
00037                 return -1;
00038         }
00039         
00040 }


liblogger © 2007 - SourceForge.net Logo