• What is the current state of the project?
    See also here. The current stable version 0.9.7 is outdated and contains some significant bugs, so that it should not be used anymore. The new version 0.10.0 has been recently released.
  • How can the current SVN head be built?
    SVN Head contains two build systems, one based on ant and one based on GNU autotools.
    The ant based build system runs on all supported platforms, while the GNU autotools mechanism is restricted to POSIX platforms. The ant based build system also automatically downloads and builds the APR libraries, while the GNU autotools mechanism requires those libraries to be already available.
  • Are there binaries available?
    A nightly build is performed on GUMP, based on the ant build system.
    To make sure that the GNU autotools based build system also works properly, a nightly (unofficial) build based on it is created at http://www.littletux.net/log4cxx. This build also executes the unit tests. The build is based on SVN HEAD, but usually contains some additional patches which are not yet in committed to the SVN repository. The platform is a Debian GNU/Linux 3.1 System using gcc 3.3.5.
  • Where can I learn more? / Is there a log4cxx book?
    Log4cxx is patterned after the log4j API, so the log4j book should go a long way towards getting your head around using the C++ API. The two should be functionally and structurally equivalent (down to the bugs). It would be nice to compile a list of good log4cxx or generic log4j examples on the OtherResources page.
  • This FAQ seems short, don't people ask other questions, or am I the only one not getting it?
    Have you seen the formal faq for log4cxx? Your question may be answered there. Also feel free to help build up this FAQ on the Wiki.
  • In <<Short introduction to log4cxx>>, it's said "The log4cxx environment is fully configurable programmatically." - But how do I do this?
    For starters:
    #include <log4cxx/logger.h>
    #include <log4cxx/helpers/pool.h>
    #include <log4cxx/basicconfigurator.h>
    #include <log4cxx/fileappender.h>
    #include <log4cxx/simplelayout.h>
    
    int main() {
       log4cxx::FileAppender * fileAppender = new
    log4cxx::FileAppender(log4cxx::LayoutPtr(new log4cxx::SimpleLayout()),
    "logfile", false);
    
       log4cxx::helpers::Pool p;
       fileAppender->activateOptions(p);
    
       log4cxx::BasicConfigurator::configure(log4cxx::AppenderPtr(fileAppender));
       log4cxx::Logger::getRootLogger()->setLevel(log4cxx::Level::getDebug());
       log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger("logger");
    
       LOG4CXX_INFO(logger,"Created FileAppender appender");
    
       return 0;
    }
       
  • No labels