0

gcc: Compilation Warning: incompatible implicit declaration of built-in function `log’

Posted by Joys of Programming on in C/C++

The purpose of log() as described by the man page Let’s make use of log in a simple program Now compile the program log.c… You will see the following warnings. This is because we missed to add the headers which declare the function log() and the supporting types Let’s add the relevant header files (.h) [...]

Tags: , , ,

 
0

gcc: Linking Error: undefined reference to `log’

Posted by Joys of Programming on in C/C++

The purpose of log is described by the man page as follows Let’s make use of log in a simple program Now compile the program log.c… You will see the following errors This is because the program is not properly linked Compile the program with the flags “m” along with -l option of gcc as [...]

Tags: , , , ,

 
0

Configuring log4cpp (Simple)

Posted by Joys of Programming on in C/C++

If you want to see how log4cpp works with the basic configuration, there is a log4cpp::BasicConfigurator. It adds a FileAppender which logs the output to standard output and uses a BasicLayout. On executing this program, you will get the following output on the terminal

Tags: , , , , , ,

 
1

log4cpp::RollingFileAppender – How to Backup and Roll Over log files?

Posted by Joys of Programming on in C/C++

It is very important to log the events in your software both for analytics and debugging.  Log4cpp is helpful for logging in with C++. Log4Cpp::File Appender can be used to direct the output of logs to a file. But there are certain challenges that you may face while using log files The files can soon [...]

Tags: , , , , , , , , , , ,

Copyright © 2009-2012 Joys of Programming All rights reserved.
Desk Mess Mirrored v1.8.1 theme from BuyNowShop.com.