Sorry forgot to tell that I also have a static variable declared in a header file

static log4cxx::LoggerPtr logger;

Lars Schouw <> wrote:
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.

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;
if (argc > 1)
String propertyFileName = argv[1];

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


Do you Yahoo!?
Yahoo! Domains Claim yours for only $14.70/year

Do you Yahoo!?
Yahoo! Domains - Claim yours for only $14.70/year