Is Log4cpp new, or has it been abandoned?
Any C++ programmers use Log4cpp? For C# we use Log4net for logging, and when I found that PC SMS used Log4cpp as it's logging framework I just assumed it would be as easy to configure as Log4net.
But Log4net has a very active user community, and the mailing list gets regular visits from the developers Ron and Nicko. No so with Log4cpp.
All I needed was a really simple basic setup to log to a file. Could I find anything? Well, would you find this useful, which says "The configuration file format is undocumented and may change without notice". Ok...
Luckily I found the log4cpp.properties file buried within the tests directory of the log4cpp download, which goes some way to giving the example I needed.
So, if anyone else is searching for the simplest Log4cpp configuration to log to a file, just use this:
log4j.rootCategory=DEBUG, FILE
appender.FILE=org.apache.log4j.FileAppender
appender.FILE.fileName=c:\filename.log
appender.FILE.layout=org.apache.log4j.BasicLayout
And no, that's not a typo, and I haven't cut and paste from the wrong file: Log4cpp uses Log4j stuff in its configuration file.