log4cpp::PropertyConfigurator – Configure with configuration files
log4cpp can also be configured with the configuration files. log4cpp::PropertyConfigurator can be used for this purpose. It has a single function which takes as input the configuration file. Simply specify the configuration in a file. You must specify the layout, priority and the appender in the configuration file as shown here You can read here [...]
Configuring log4cpp (Simple)
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