I tried to add a configuration file to my project but
when I run it I get this error:
You have tried to set a null level to root.
and an exception it thrown.
This is before I even hit the main function so it must
belong to the static variable I declared the is
initialized when the object is loaded.

My souce code:

// include log4cxx header files.
#include <log4cxx/logger.h>
#include <log4cxx/basicconfigurator.h>
#include <log4cxx/propertyconfigurator.h>
#include <log4cxx/helpers/exception.h>

using namespace log4cxx;
using namespace log4cxx::helpers;

// Define a static logger variable so that it
references the logger instance named "RALtest".
LoggerPtr logger = Logger::getLogger(_T("RALtest"));

int main(int argc, char* argv[])
{
        int result = EXIT_SUCCESS;
        try
        {
                if (argc > 1)
        {
                        USES_CONVERSION;
                        String propertyFileName = argv[1];
                        PropertyConfigurator::configure(propertyFileName);
                 }
                else
        {
                        BasicConfigurator::configure();
        }

                logger->info(_T("Entering RALtest application."));
....

Lars







        
                
__________________________________
Do you Yahoo!?
Yahoo! Domains � Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

Reply via email to