4. Including the logger in your C / C++ Source files

The Following is a simple example which illustrates the basic usage of liblogger, for more complex examples see section examples. After including the above header, the log functions can be called. For Example :
        #include <liblogger/liblogger.h>
        int main(int argc, char** argv)
                LogDebug(" Debug message... ");
                LogInfo (" int val = %d ", 9);
                // ......
                LogFatal(" Fatal error has occured, ptr %#x ", 0XABCD );
                // .... other log functions. ........
                return 0;

See also:
For More examples , such as controlling the log level, associating a module name, see the section examples

liblogger © 2007 - SourceForge.net Logo